Skip to content

Conversation

@goralczyks
Copy link
Collaborator

@goralczyks goralczyks commented Nov 7, 2025

πŸ“ƒ Ticket

#318, #319

✍ Description

  1. removed GET /api-token method
  2. token created with POST /api-token consists of 2 parts:
  • id
  • confidential secret (stored in DB as hash)
  1. user need to provide both parts for verification as single string in format: "id.secret": id is used to search user in DB, secret is verified against hash

@goralczyks goralczyks linked an issue Nov 7, 2025 that may be closed by this pull request
@github-actions github-actions bot added the feature Adding a new feature label Nov 7, 2025
@goralczyks goralczyks linked an issue Nov 7, 2025 that may be closed by this pull request
@github-actions github-actions bot added the test Adding or correcting existing tests label Nov 13, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.

Files with missing lines Coverage Ξ”
backend/oqtopus_cloud/common/models/user.py 100.00% <100.00%> (ΓΈ)
backend/oqtopus_cloud/user/routers/api_token.py 100.00% <100.00%> (ΓΈ)
backend/oqtopus_cloud/user/schemas/api_token.py 100.00% <100.00%> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@goralczyks goralczyks marked this pull request as ready for review November 14, 2025 09:11
@shgokita
Copy link
Contributor

shgokita commented Dec 5, 2025

Here are two points of feedback:

  • From a cryptographic strength perspective, please change the hash function from bcrypt to argon2id.
    Reference: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html

  • Regarding the GET /api-token API, I had planned to remove it, but since we want to retain the functionality to retrieve the expiration date, could you modify it to only return the expiration date as GET /api-token/status?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adding a new feature test Adding or correcting existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Implement Secure API Key Storage with Hashing [Feature Request]: Enhance API Key Length to 128+ bits

4 participants