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

Log API Requests #274

Open
7 tasks
nelsonic opened this issue May 13, 2020 · 0 comments
Open
7 tasks

Log API Requests #274

nelsonic opened this issue May 13, 2020 · 0 comments
Labels
API discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality MVP priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

With the creation of the API #273 and our goal of making it easy for anyone to request their @dwyl App data via JSON/WebSockets, we need to have the means of logging requests in place quite soon ... πŸ’­ ⏳

Story

As a developer building an App with an API,
I want to have logging of all API requests
So that we can detect anomalous usage patterns and guarantee service levels.

Note: by having API request logging we will automatically have UI request logging because we are using Content Negotiation to render JSON for API and HTML for UI requests to the same route.
This issue is specific to API Logging because it's the highest "risk" for abuse and potential data breach. If someone accidentally leaks their AUTH_API_KEY e.g. by committing some code to GitHub, they could leak all their data. We need to avoid that by having logging to prevent new devices from accessing data. i.e. we need to log the device ID + IP address of all API requests so that we can check if new devices/IPs are being used and force a re-auth.

Todo

This will eventually be replaced by "Client Hints" for better privacy (according to Google) πŸ™„
see: https://www.zdnet.com/article/google-to-phase-out-user-agent-strings-in-chrome )
Probably not for the next year. So for now, User Agent Strings. πŸ‘

  • timstamps (default in all Ecto/Phoenix schemas)

This is related to: Logging "Login" Attempts: dwyl/auth#67 (P2)
and Logging in General: dwyl/learn-devops#60

@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality discuss Share your constructive thoughts on how to make progress with this issue MVP API priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished technical A technical issue that requires understanding of the code, infrastructure or dependencies labels May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality MVP priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

1 participant