Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data routing between IDS Connector and Apps from the IDS AppStore #437

Open
ahemaid opened this issue Sep 6, 2022 · 4 comments
Open

Data routing between IDS Connector and Apps from the IDS AppStore #437

ahemaid opened this issue Sep 6, 2022 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@ahemaid
Copy link
Member

ahemaid commented Sep 6, 2022

The functionality of data routing between the IDS Connector and the downloaded apps from IDS AppStore is not working.

To Reproduce
Steps to reproduce the behavior:
1- after successfully downloading an app from the binac appstore using the following offer "https://binac.fit.fraunhofer.de/api/offers/c9fba083-5caa-4ebb-8bdd-b26a14231e82"

2- Then, the app was started using the following API and the app can be seen on portainer with its running status:

curl -X 'PUT' \
  'https://0.0.0.0:8081/api/apps/89e51880-277d-4fb3-bf9f-82b59da92d7b/actions?type=START' \
  -H 'accept: application/json'

3- Next, to allow routing between the IDS connector and the deployed app, a camel route has been created using the following command:

curl -X 'POST' \
  'https://0.0.0.0:8081/api/routes' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "AccessDataApp",
  "description": "string",
  "configuration": "string",
  "deploy": "Camel"
}'

The response:

{
  "creationDate": "2022-09-06T12:38:31.981+0000",
  "modificationDate": "2022-09-06T12:38:31.981+0000",
  "title": "AccessDataApp",
  "description": "string",
  "configuration": "string",
  "deploy": "Camel",
  "start": null,
  "end": null,
  "additional": {},
  "_links": {
    "self": {
      "href": "https://0.0.0.0:8081/api/routes/3e355e54-fd77-4dc3-9ba8-2ddc8b9e1b9a"
    },
    "routes": {
      "href": "https://0.0.0.0:8081/api/routes/3e355e54-fd77-4dc3-9ba8-2ddc8b9e1b9a/steps{?page,size}",
      "templated": true
    },
    "output": {
      "href": "https://0.0.0.0:8081/api/routes/3e355e54-fd77-4dc3-9ba8-2ddc8b9e1b9a/output"
    }
  }
}

4- Followed by setting the setting the endpoint of the app as a start of the created route using the following command:

curl -X 'PUT' \
  'https://0.0.0.0:8081/api/routes/3e355e54-fd77-4dc3-9ba8-2ddc8b9e1b9a/endpoint/start' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '"https://0.0.0.0:8081/api/endpoints/de5c01dc-6882-465b-94c5-6dee24df7334"'

5- Finally, an artifact has been created by the following:

curl -X 'POST' \
  'https://0.0.0.0:8081/api/artifacts' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "dataArtifact",
  "description": "string",
  "accessUrl": "https://0.0.0.0:8081/api/routes/3e355e54-fd77-4dc3-9ba8-2ddc8b9e1b9a",
  "automatedDownload": true
}'

The response:

{
  "creationDate": "2022-09-06T12:49:58.799+0000",
  "modificationDate": "2022-09-06T12:49:58.799+0000",
  "remoteId": "genesis",
  "title": "dataArtifact",
  "description": "string",
  "numAccessed": 0,
  "byteSize": 0,
  "checkSum": 0,
  "additional": {},
  "_links": {
    "self": {
      "href": "https://0.0.0.0:8081/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e"
    },
    "data": {
      "href": "https://0.0.0.0:8081/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e/data"
    },
    "representations": {
      "href": "https://0.0.0.0:8081/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e/representations{?page,size}",
      "templated": true
    },
    "agreements": {
      "href": "https://0.0.0.0:8081/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e/agreements{?page,size}",
      "templated": true
    },
    "subscriptions": {
      "href": "https://0.0.0.0:8081/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e/subscriptions{?page,size}",
      "templated": true
    },
    "route": {
      "href": "https://0.0.0.0:8081/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e/route"
    }
  }
}

6- Now, to access the data with the created artifact, the following was used:

curl -X 'GET' \
  'https://0.0.0.0:8081/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e/data/**?download=true' \
  -H 'accept: */*'

where it should return the data output but it fails with the given message:

{
  "details": "Failed to retrieve data.app-1662467546832: Name or service not known",
  "message": "Failed to retrieve data."
} 

Expected behavior

  • To be able to access the data artifact of the apps.

Screenshots & Logs

2022-09-06T12:51:57,393 [https-jsse-nio-8081-exec-4] DEBUG - Found 'Content-Type:application/json' in response
2022-09-06T12:51:57,393 [https-jsse-nio-8081-exec-4] DEBUG - Writing [{"details":"Failed to retrieve data.app-1662467546832: Name or service not known","message":"Failed  (truncated)...]
2022-09-06T12:51:57,394 [https-jsse-nio-8081-exec-4] DEBUG - Resolved [java.io.IOException: Could not connect to data source.]
2022-09-06T12:51:57,395 [https-jsse-nio-8081-exec-4] DEBUG - Closing JPA EntityManager in OpenEntityManagerInViewInterceptor
2022-09-06T12:51:57,395 [https-jsse-nio-8081-exec-4] DEBUG - Completed 417 EXPECTATION_FAILED
2022-09-06T12:51:57,395 [https-jsse-nio-8081-exec-4] DEBUG - onApplicationEvent: ServletRequestHandledEvent: url=[/api/artifacts/d0a7cfa3-2e22-4da9-aa07-146ba9cf8c5e/data/**]; client=[172.17.0.1]; method=[GET]; servlet=[dispatcherServlet]; session=[null]; user=[admin]; time=[256ms]; status=[OK]

Desktop

  • OS: Ubuntu
  • Browser: chrome and firefox
  • Version (DSC): 8.0

Additional context

  • I can see that the IDS Connector cannot reach the apps with their domain name since those domain names are not in its /etc/hosts, where it is needed to access them with their DNS.
@ahemaid
Copy link
Member Author

ahemaid commented Sep 27, 2022

@omarsilva1, any plan to solve the above issue, since we will help to show the functionality of the app ecosystem inside the IDS environment?

@omarsilva1
Copy link

We will discuss the priority of this issue internally and then give an update.

@boxer-code
Copy link

Are there any updates about this issue? I'm facing it too.

@SebastianOpriel SebastianOpriel added the help wanted Extra attention is needed label Feb 19, 2023
@SebastianOpriel
Copy link
Member

no updates so far. We would welcome your help in fixing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants