Skip to content

PK for APIKey models should not contain hashed key #128

@florimondmanca

Description

@florimondmanca

Is your feature request related to a problem? Please describe.
Currently the PK on APIKey model (or derived models) is a string in the form of {prefix}.{hash}. While not completely insecure, this string contains special characters so it's tricky to pass in URLs, making it hard to build frontend API key management functionality.

Describe the solution you'd like
Convert the APIKey PK to a standard autoincremented integer.

A migration and detailed upgrade instructions should be provided to make this change non-breaking (no API keys should be lost/have to be regenerated in the process).

Describe alternatives you've considered
/

Additional context
This is a long-discussed feature, and actually there has been discussion on this in the past:

So to solve this we should:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement of an existing feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions