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

[BUG]: Proxy issues keys for unregistered developers #42

Open
fogfish opened this issue Apr 14, 2019 · 1 comment
Open

[BUG]: Proxy issues keys for unregistered developers #42

fogfish opened this issue Apr 14, 2019 · 1 comment

Comments

@fogfish
Copy link
Contributor

fogfish commented Apr 14, 2019

The issue_key always issues key even it developer is not registered. The correct behaviour is to fail with 404 or bad request.

curl -vvv localhost:4001/plugins/auth_key/issue_key \
   -H 'Content-Type: application/json' \
   -d '{"developer_id": "d8d63fd0-3987-48dc-9ac2-2f2f5fe49e92"}'
@phanimahesh
Copy link
Member

It is a bug, the implementation is incomplete. I would prefer 400 bad request since the route exists, it's the payload that is nonsensical.

A check to verify that the developer id exists should be sufficient to fix this.

In addition to verifying that the developer exists, we should also verify that the request is from the same developer. Control api will take care of the authentication and make it available on the connection as metadata. I'll write up a proposal on what data will be made available and how it is expected to be accessed.

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