Add ability to view and manage api keys via the frontend
- Dominant language
- Python
- Stars
- 13
- Forks
- 17
- Avg merge
- 6h 59m
- Merged PRs (30d)
- 1
Description
> [!NOTE]
> Migrated from [augurlabs/augur#3041](https://github.com/augurlabs/augur/issues/3041)
> Originally opened by `@ABrain7710` on 2025-03-05
---
- Add "Worker Oauth Keys" section to the admin dashboard
- Display keys in a table
- Use the same table layout and formatting that is used for current frontend tables (IE: pagination, common theme, etc...)
- Make table filterable and sortable by each column
- Only display relevant columns: Key ID, Key platform, Token (hidden by default, click to show)
- Add delete button (with confirmation) to remove a key from the worker_oauth table and unpublish from the key orchestrator
- Display invalid keys in a table separately from the rest, with the same formatting as the primary table
- Keys must be gathered from the `KeyPublisher` interface, and joined on the data from the worker_oauth table in order to determine the IDs of the invalid keys at runtime.
- Additionally, any keys in the worker_oauth table that were not loaded into the key orchestrator interface at startup are also considered invalid.
- All requisite endpoints must be protected with `@admin_required`
- Add form to insert new keys
1. Add new keys to worker_oauth table
2. Check that the provided key is valid before inserting (via `is_bad_api_key()` in `GithubApiKeyHandler` or `GitlabApiKeyHandler`)
3. Publish new keys with the KeyPublisher so they are available for new collection requests
Prerequisites
---
The admin dashboard is being implemented in the [admin-changes](/chaoss/augur/tree/admin-changes) branch. All changes to the dashboard must be based on this branch.
This issue is dependent upon the merging of augurlabs/augur#3058, as that adds the INVALIDATE commands to the orchestration API and the KeyClient.
Contributor guide
Assessment
This issue has not been assessed yet.