Mobility-Data-Space / mobility-data-space

Mobility Data Space ist the data sharing community for all actors who would like to design the mobility of tomorrow.
https://mobility-dataspace.eu
8 stars 1 forks source link

Registering two connectors #19

Closed sebplorenz closed 2 years ago

sebplorenz commented 3 years ago

We tried to register two IDS connectors at https://ids.broker.test.mobilitydataspace.io/infrastructure, but unfortunately only one of the two connectors can be registered at any given time. Also, both the connectors somehow are interconnected to each other. We are not entirely sure why this behavior is observed, kindly advise.

sebplorenz commented 3 years ago

Hi, can you be more specific about "only one of the two connectors can be registered at any given time." Do the connectors have different IDs? If both connectors have different IDs then they are both visible. What means "somehow are interconnected to each other"? What is the behavior you observe?

sachinkumarUI commented 3 years ago

Hi, The two connectors do have different ids, but are being running from a same machine sharing the same IP address. What I mean by interconnected connector is that, lets say that I have a connector registered at the broker, now i can deregister this connector from the broker using the secondary connector

connector descriptions 1. {'@context': {'ids': 'https://w3id.org/idsa/core/', 'idsc': 'https://w3id.org/idsa/code/'}, '@type': 'ids:BaseConnector', '@id': 'https://w3id.org/idsa/autogen/baseConnector/7b934432-a85e-41c5-9f65-669219dde4ea', 'ids:description': [{'@value': 'IDS Connector by ', '@type': 'http://www.w3.org/2001/XMLSchema#string'}], 'ids:version': '@project.version@', 'ids:publicKey': {'@type': 'ids:PublicKey', '@id': 'https://w3id.org/idsa/autogen/publicKey/78eb73a3-3a2a-4626-a0ff-631ab50a00f9', 'ids:keyType': {'@id': 'https://w3id.org/idsa/code/RSA'}, 'ids:keyValue': '' 'ids:hasDefaultEndpoint': {'@type': 'ids:ConnectorEndpoint', '@id': 'https://w3id.org/idsa/autogen/connectorEndpoint/e5e2ab04-633a-44b9-87d9-a097ae6da3cf', 'ids:accessURL': {'@id': 'https://ids.urbanpulse.de/api/ids/data'}, 'ids:endpointDocumentation': [], 'ids:endpointInformation': []}, 'ids:hasEndpoint': [], 'ids:resourceCatalog': [{'@type': 'ids:ResourceCatalog', '@id': 'http://ids.urbanpulse.de/api/catalogs/41da1009-306e-4c84-baa7-caaaf9150552', 'ids:requestedResource': [], 'ids:offeredResource': []}], 'ids:hasAgent': [], 'ids:securityProfile': {'@id': 'https://w3id.org/idsa/code/BASE_SECURITY_PROFILE'}, 'ids:maintainer': {'@id': }, 'ids:extendedGuarantee': [], 'ids:curator': {'@id':}, 'ids:inboundModelVersion': ['4.2.0', '4.1.2', '4.0.0', '4.1.0'], 'ids:title': [{'@value': 'Dataspace Connector', '@type': 'http://www.w3.org/2001/XMLSchema#string'}], 'ids:outboundModelVersion': '4.2.0'}

2. {'@context': {'ids': 'https://w3id.org/idsa/core/', 'idsc': 'https://w3id.org/idsa/code/'}, '@type': 'ids:BaseConnector', '@id': 'https://w3id.org/idsa/autogen/baseConnector/7b934432-a85e-41c5-9f65-669219dde4ea', 'ids:description': [{'@value': 'MRN IDS Connector', '@type': 'http://www.w3.org/2001/XMLSchema#string'}], 'ids:version': '@project.version@', 'ids:publicKey': {'@type': 'ids:PublicKey', '@id': 'https://w3id.org/idsa/autogen/publicKey/78eb73a3-3a2a-4626-a0ff-631ab50a00f9', 'ids:keyType': {'@id': 'https://w3id.org/idsa/code/RSA'}, 'ids:keyValue': '' 'ids:hasDefaultEndpoint': {'@type': 'ids:ConnectorEndpoint', '@id': 'https://w3id.org/idsa/autogen/connectorEndpoint/e5e2ab04-633a-44b9-87d9-a097ae6da3cf', 'ids:accessURL': {'@id': 'https://mrn-ids.urbanpulse.de/api/ids/data'}, 'ids:endpointDocumentation': [], 'ids:endpointInformation': []}, 'ids:hasEndpoint': [], 'ids:resourceCatalog': [], 'ids:hasAgent': [], 'ids:securityProfile': {'@id': 'https://w3id.org/idsa/code/BASE_SECURITY_PROFILE'}, 'ids:maintainer': {'@id'}, 'ids:extendedGuarantee': [], 'ids:curator': {'@id, 'ids:inboundModelVersion': ['4.2.0', '4.1.2', '4.0.0', '4.1.0'], 'ids:title': [{'@value': 'Dataspace Connector', '@type': 'http://www.w3.org/2001/XMLSchema#string'}], 'ids:outboundModelVersion': '4.2.0'}

sachinkumarUI commented 3 years ago

Hi, Resolved the issue by creating a different connectorId I was expecting it to be automatically created, but in the test env we can assign any accepted value. we managed to do it in python using uuid and md5 library. below are the steps we followed

  1. Create a a new connector id import uuid import hashlib

m = hashlib.md5() m.update(connector_name.encode('utf-8')) connectorId = str(uuid.UUID(m.hexdigest()))

  1. update the config.json file with the newly created connectorId