Skip to content

[FR] Add oAuth2 for API access #9256

Closed

Description

@matmair

Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

Problem statement

Our current token system always inherits the permissions from the current user. This makes tokens possibly pretty dangerous. You also need to refresh tokens by hand when they expire.

Suggested solution

There is a known and widely used protocol to solve these issues: oAuth2. After a few experiments, it seems to integrate pretty nicely with our current stack (mapping the role system).

As a breaking step, I would recommend that we later on remove basic auth and amend the token auth model with the same scopes. Similar to how GitHub handles this.

Describe alternatives you've considered

Examples of other systems

Microsoft, Google, GitHub all use oAuth2

Do you want to develop this?

  • I want to develop this.

Activity

  1. added
    api
    enhancement
    on Mar 7, 2025
  2. matmair commented on Mar 7, 2025

    @matmair
    MemberAuthor
  3. matmair commented on Mar 7, 2025

    @matmair
    MemberAuthor

    In testing how complex this could be I made matmair#308 which is probably already 80% there.

  4. added
    security
    on Mar 10, 2025
  5. added this to the horizon milestone on Mar 10, 2025
  6. self-assigned this
    on Jul 1, 2025
  7. modified the milestones: horizon, 1.0.0 on Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apienhancementsecurity

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions