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

Sign all API requests with a user specific key #1

Open
aaronlinsky opened this issue Apr 6, 2020 · 0 comments
Open

Sign all API requests with a user specific key #1

aaronlinsky opened this issue Apr 6, 2020 · 0 comments

Comments

@aaronlinsky
Copy link
Contributor

We need all requests to the backend to be authenticated before processing. This prevents a malicious actor from claiming they're user_id=x when they actually aren't.

  1. During the create user flow, generate an asymmetric key pair when the fcm token is created. Store those keys in the same location on the device that the fcm (and later user_id) is stored.
  2. Send the public key to the backend service in the create user call.
  3. For all subsequent calls, sign the request contents with the private key.
  4. The backend services will verify that the requests are actually coming from the given user.
@aaronlinsky aaronlinsky added this to the Public Release milestone Apr 18, 2020
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

1 participant