Skip to content

Epic: Personal Access Tokens #14280

Closed
Closed
@easyCZ

Description

@easyCZ

Summary

To enable automated interaction with Gitpod, users need the ability to manage their Personal Access Tokens.

Context

Personal Access Tokens are API tokens which act on behalf of the user. They can be used to automate workflows against Gitpod.

Value

  • Integration on API level
  • Enables extensibility of Gitpod
  • Complements our efforts to introduce the Public API

Acceptance Criteria

The user is able to:

  • Create Access Token
  • Rotate an Access Token
  • List Tokens
  • Delete a Token

Measurement

  • We will measure proportion of traffic against Gitpod with API keys vs regular dashboard sessions

RFC

User stories

  1. As a user, I want to add a token with a name, an expiry date, and scopes, so that I can use it to authenticate
    Note: Properties here
  2. As a user, I want to see the token that I have just created.
  3. As a user, I want to see the tokens that I have created, when it expires, and when it was used.
    Note: without seeing the secret value
  4. As a user, I want to delete a token so that I can revoke permissions
  5. As a user, I want to regenerate a token (for any reason) and see the new token.
  6. As a user, I want to update the scopes of an existing token.
  7. As a user, I want to authenticate to Gitpod API using my existing token.

Milestone plan

  • 1 week of API implementation
  • 1 week of UI implementation
  • 1 week of validation
    Note: UI and API implementation can be started independently

Diagram

Screenshot 2022-11-11 at 12 57 28

Storage

Will be stored in a new table d_b_personal_access_token.
Reasons why we are not using the existing d_b_gitpod_token:

  • Does not fit the new usecase
  • Allows simpler migration path in the future

(additional contexts[1][2])

Schema

-- field type
primary key, idx id varchar
idx user_id varchar
idx hash varchar
  name varchar
  description text
  scopes text
  expiration_time timestamp
  created_at timestamp
idx last_modified timestamp
  deleted boolean

Issues

Rollout

Documentation

https://www.gitpod.io/docs/configure/user-settings/access-tokens

Follow-up

Follow-up epic which tracks feedback, improvements and general direction towards a stable release is in

Metadata

Metadata

Assignees

Labels

feature: public-apiIssues relating to Public APImeta: staleThis issue/PR is stale and will be closed soonteam: webappIssue belongs to the WebApp teamtype: epic

Type

No type

Projects

Status

In Validation

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions