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

[DataStorage] Request Rejection from localhost and 127.0.0.1 #403

Open
tiokim opened this issue Oct 20, 2021 · 1 comment
Open

[DataStorage] Request Rejection from localhost and 127.0.0.1 #403

tiokim opened this issue Oct 20, 2021 · 1 comment
Assignees
Labels
IdealFirstTask Task for newcomers

Comments

@tiokim
Copy link
Contributor

tiokim commented Oct 20, 2021

Describe the issue
DataStorage rejects localhost and 127.0.0.1 requests other than the IP set as Service's Host in configuration.toml.

To Reproduce

  1. Run Edge Orchestration with edgex
  2. Requests to Edge Orchestration DataStorage
  • curl -X POST "127.0.0.1:49986/api/v1/resource/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 1
  • curl -X POST "localhost:49986/api/v1/resource/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 1
t25kim@t25kim:~/work/edge-home-orchestration-go$ curl -X POST "10.113.70.227:49986/api/v1/resource/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 123
t25kim@t25kim:~/work/edge-home-orchestration-go$ curl 10.113.70.227:49986/api/v1/resource/int
[{"id":"962444ff-4294-4136-8b24-1eca535da035","created":1634703497600,"origin":1634703497598631070,"device":"edge-orchestration-c1b23cc6-0767-400a-9cf0-36e1b3902da2","name":"int","value":"123","valueType":"Int64"}]

t25kim@t25kim:~/work/edge-home-orchestration-go$ curl -X POST "127.0.0.1:49986/api/v1/resource/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 1
curl: (7) Failed to connect to 127.0.0.1 port 49986: Connection refused
t25kim@t25kim:~/work/edge-home-orchestration-go$ curl -X POST "localhost:49986/api/v1/resource/int" -H "accept: text/plain" -H "Content-Type: text/plain" -d 1
curl: (7) Failed to connect to localhost port 49986: Connection refused

Expected solution

  • Request EdgeX to open up to localhost and 127.0.0.1

Alternative

  • Create a REST API that returns service host information at externalhandler
@tiokim
Copy link
Contributor Author

tiokim commented Nov 12, 2021

@NiranjanPatil25 @suresh-lc @nitu-s-gupta Please take a look and share your idea.

@tdrozdovsky tdrozdovsky added the IdealFirstTask Task for newcomers label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IdealFirstTask Task for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants