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

Add ability to view and manage api keys via the frontend #3041

Open
ABrain7710 opened this issue Mar 5, 2025 · 4 comments · May be fixed by #3062
Open

Add ability to view and manage api keys via the frontend #3041

ABrain7710 opened this issue Mar 5, 2025 · 4 comments · May be fixed by #3062

Comments

@ABrain7710
Copy link
Contributor

ABrain7710 commented Mar 5, 2025

  • 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 branch. All changes to the dashboard must be based on this branch.

This issue is dependent upon the merging of #3058, as that adds the INVALIDATE commands to the orchestration API and the KeyClient.

@demoncoder-crypto
Copy link

I tried to work on this issue. let me if anything else is needed

@Ulincsys
Copy link
Contributor

This issue was originally a backlog item that we had intended on working towards at a later date.

However, since it has drawn much attention over the past week, I've added the specific requirements for a full implementation of the interface.

@officialasishkumar
Copy link

should i create a new branch on top of admin-changes branch and put my work there?

cc: @Ulincsys

@Ulincsys
Copy link
Contributor

@officialasishkumar You can rebase off of dev, or make a new branch.

Or, we will be pulling dev up to speed with main as soon as #3077 gets merged, then your branch will be able to be merged with dev without creating a conflict and without the need to rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants