release/v1.6.67 - #284
Merged
Merged
release/v1.6.67#284
Conversation
…ion time API keys were sqids(digits of the creation timestamp + row id). ApiCredential uses the uuid as its primary key with incrementing disabled, so the auto-increment id is never read back on insert and the observer always saw null: every key created in the same second, on any organization, was identical. AuthenticateOnceWithBasicAuth resolves a key with first(), so a holder of one organization's key could authenticate as another's. Even with the id, a key built from a timestamp and a sequential id is guessable. generateKeys() now returns 32 random alphanumeric characters (Str::random, backed by random_bytes). Its argument is ignored and optional; the observer and the roll endpoint no longer build a seed. Found when the k6 release benchmark minted three keys within a second and two came out identical.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 7772 7772
===========================================
Files 436 436
Lines 25337 25334 -3
===========================================
- Hits 25337 25334 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fix(security): generate API keys from the CSPRNG instead of the creation time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release v1.6.67: API keys are generated from the CSPRNG. Previously, keys created in the same second were identical across organizations. The notes, including the check for existing duplicate keys, are in
RELEASE.md.Includes:
Merge #283 into this branch first. Merging this branch into
maintagsv1.6.67. After tagging, bumpfleetbase/core-apito^1.6.67inapion the next fleetbase release branch.