Skip to content

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

Open
@ABrain7710

Description

@ABrain7710
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions