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

talaria requires header but does not validate/use it #132

Closed
ilawjr opened this issue May 12, 2020 · 2 comments · Fixed by #135
Closed

talaria requires header but does not validate/use it #132

ilawjr opened this issue May 12, 2020 · 2 comments · Fixed by #135
Assignees
Projects

Comments

@ilawjr
Copy link

ilawjr commented May 12, 2020

When you submit an api request Talaria requires the "X-Webpa-Device-Name" header, but it doesn't validate it against the message.

e.g.

curl -i -H "Authorization:$basicauth" -H "Content-Type:application/json" -H "Accept:application/json" --data-binary '@SimpleApiRequestMessage.json' -X POST https://$a:8080/api/v2/device/send

results in a 400

{"code": 400, "message": "Could extract device id: Missing device name header"}

whereas :

export b=mac:112233445566
curl -i -H "Authorization:$basicauth" -H "Content-Type:application/json" -H "Accept:application/json" --data-binary '@SimpleApiRequestMessage.json' -X POST https://$a:8080/api/v2/device/send -H "X-Webpa-Device-Name:$b"

will succeed even if $b does not match the device inside the SimpleApiRequestMessage.json which is set to

"dest":"mac:4ca155000006/config",

It appears that talaria doesn't use or validate against this header. A request without the dest field will fail with a 400.

@johnabass
Copy link
Contributor

This was a design decision from very early in the project's life, years ago. There's no bug here, and it shouldn't hold up any deployments.

As to whether things should still work this way, that's a question for @schmidtw

@joe94 joe94 added this to New issues in XMiDT via automation May 12, 2020
@joe94 joe94 moved this from New issues to Reviewed in XMiDT May 20, 2020
@joe94
Copy link
Member

joe94 commented May 20, 2020

After discussions, we decided talaria should no longer require this header. We should also then change scytale so it no longer sends such header.

@joe94 joe94 linked a pull request May 21, 2020 that will close this issue
@joe94 joe94 moved this from Reviewed to In progress in XMiDT May 21, 2020
XMiDT automation moved this from In progress to Done May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
XMiDT
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants