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

api key: upgrade encryption scheme of key-secret in db #6880

Open
giancarloromeo opened this issue Dec 2, 2024 · 1 comment
Open

api key: upgrade encryption scheme of key-secret in db #6880

giancarloromeo opened this issue Dec 2, 2024 · 1 comment
Assignees
Labels
a:webserver issue related to the webserver service
Milestone

Comments

@giancarloromeo
Copy link
Contributor

giancarloromeo commented Dec 2, 2024

  • migration from old to new scheme
@giancarloromeo giancarloromeo self-assigned this Dec 2, 2024
@giancarloromeo giancarloromeo added the a:webserver issue related to the webserver service label Dec 2, 2024
@giancarloromeo giancarloromeo added this to the Event Horizon milestone Dec 2, 2024
@giancarloromeo
Copy link
Contributor Author

We need to store a hashed version of the api_key, I would suggest using bcrypt library.

When storing hashed keys:

  • Generate a random API key and hash it using bcrypt.
  • Store the hashed key in the database.

When verifying:

  • Retrieve the hashed key from the database.
  • Use the corresponding library's verify function to check the provided API key against the hash.

All existing API keys already stored in the DB must be hashed & updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service
Projects
None yet
Development

No branches or pull requests

2 participants