Skip to content

feat!: replace plain-text DRF token with PBKDF2-hashed API token#2087

Merged
tdruez merged 7 commits intomainfrom
secured-api-keys
Mar 11, 2026
Merged

feat!: replace plain-text DRF token with PBKDF2-hashed API token#2087
tdruez merged 7 commits intomainfrom
secured-api-keys

Conversation

@tdruez
Copy link
Contributor

@tdruez tdruez commented Mar 9, 2026

Changes

  • migrate from DRF authtoken to aboutcode.api-auth
  • New APIToken model that stores an encoded PBKDF2 hash of the key
  • A data migration that encode existing authtoken.Token into the new model
  • Refined UI to generate and present the API key in the profile view
  • The API key is only available once when generating it, the plain key is never stored. If a key is lost, it needs to be regenerated.

tdruez added 7 commits March 9, 2026 18:47
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
@tdruez tdruez merged commit 79d7927 into main Mar 11, 2026
12 checks passed
@tdruez tdruez deleted the secured-api-keys branch March 11, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant