-
Notifications
You must be signed in to change notification settings - Fork 221
Add access token and throttled application models to Django admin #3711
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
Comments
Hi, We are a group of 5 students at KTH. As a part of a Software Engineering course we are to solve an issue for an open-source project. Ok if we attempt this one? :) @WordPress/openverse-maintainers @AetherUnbound |
Hi @bjornthiberg and others! We'd love to have y'all help contribute to the project 😄 I'll go ahead and assign it to you. Please check out our welcome and quickstart documentation pages, and if you have any questions about this issue feel free to leave them here! |
Co-authored-by: Tore Nylén <toreny@kth.se> Co-authored-by: Oozna <66669398+Oozna@users.noreply.github.com> Co-authored-by: Sam Shahriari <62112476+samshahriari@users.noreply.github.com> Co-authored-by: Sam <80268884+Samkth123@users.noreply.github.com>
Co-authored-by: Tore Nylén <toreny@kth.se> Co-authored-by: Oozna <66669398+Oozna@users.noreply.github.com> Co-authored-by: Sam Shahriari <62112476+samshahriari@users.noreply.github.com> Co-authored-by: Sam <80268884+Samkth123@users.noreply.github.com>
* Add accesstoken and ThrottledApplication to admin panel (#3711) Co-authored-by: Tore Nylén <toreny@kth.se> Co-authored-by: Oozna <66669398+Oozna@users.noreply.github.com> Co-authored-by: Sam Shahriari <62112476+samshahriari@users.noreply.github.com> Co-authored-by: Sam <80268884+Samkth123@users.noreply.github.com> * resolve import merge conflict (#5711) * resolve review comments (#3711) * make rate_limit_model searchable (#3711) --------- Co-authored-by: Tore Nylén <toreny@kth.se> Co-authored-by: Oozna <66669398+Oozna@users.noreply.github.com> Co-authored-by: Sam Shahriari <62112476+samshahriari@users.noreply.github.com> Co-authored-by: Sam <80268884+Samkth123@users.noreply.github.com>
Problem
When investigating traffic patterns and addressing malicious API usage, it can be useful to use the Django Admin web UI to check the status of an access token and/or client application.
Description
We should add the
oauth_provider.models.AccessToken
andapi.models.oauth.ThrottledApplication
tables to the Django Admin UI so that these records can be easily accessed and searched against from the web UI.openverse/api/api/models/oauth.py
Line 27 in 098925a
Those models will need their own views added to
admin.__init__
:https://github.com/WordPress/openverse/blob/5e5a2aa376048391a8455ae3063b4f3e7afe0d0d/api/api/admin/__init__.py
While I initially thought this would be good as read-only, we might even want to enable editing of certain fields so that access can be revoked by maintainers using the Admin UI as well.
Alternatives
Additional context
The text was updated successfully, but these errors were encountered: