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

The pattern node search api does not validate the workloadUrl #39

Closed
linggao opened this issue Sep 29, 2017 · 2 comments
Closed

The pattern node search api does not validate the workloadUrl #39

linggao opened this issue Sep 29, 2017 · 2 comments
Assignees

Comments

@linggao
Copy link
Member

linggao commented Sep 29, 2017

 echo '{
  "workloadUrl": "blah",
  "secondsStale": 60,
  "startIndex": 0,
  "numEntries": 0
}' |   curl -sLX POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H "Authorization:Basic  myorg/user:password" --data @- "https://exchangeurl/v1/orgs/myorg/patterns/netspeed-amd64/search" |jq '.'
{
  "nodes": [
    {
      "id": "myorg/myvs1",
      "msgEndPoint": "",
      "publicKey": "..."
    }
  ],
  "lastIndex": 0
}

Any string for workloadUrl would result in the device.

@bmpotter bmpotter changed the title The device search api does not validate the input body The pattern node search api does not validate the workloadUrl Nov 15, 2017
@bmpotter
Copy link
Member

Right. The reason it is returning your node is because this search is essentially "give me all of the nodes that use this pattern, but don't have an agreement for this workload". But i should verify the workloadUrl is part of the pattern to catch typos.

@bmpotter
Copy link
Member

Will implement this in the service resource, so i added this todo to exchange-api issue #51 because it is working on the same code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants