Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12632 +/- ##
=============================================
- Coverage 16.25% 4.15% -12.10%
=============================================
Files 5662 404 -5258
Lines 500141 32965 -467176
Branches 60728 5893 -54835
=============================================
- Hits 81299 1370 -79929
+ Misses 409759 31419 -378340
+ Partials 9083 176 -8907
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #12612 where API-key authentication could yield a different (random) user UUID per request, by ensuring the user’s UUID is read from the database and propagated into the User object used in auth/context.
Changes:
- Update the
FIND_USER_ACCOUNT_BY_API_KEYquery and result mapping to include and setu.uuid. - Adjust
UserVO(long id)initialization to delegate to the no-arg constructor. - Extend the
com.cloud.user.Userinterface to includesetUuid(String).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| engine/schema/src/main/java/com/cloud/user/dao/AccountDaoImpl.java | Adds UUID to the API-key lookup query and maps it into the User instance. |
| engine/schema/src/main/java/com/cloud/user/UserVO.java | Changes the UserVO(long id) constructor to call this() before setting id. |
| api/src/main/java/com/cloud/user/User.java | Adds setUuid(String uuid) to the User interface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
engine/schema/src/main/java/com/cloud/user/dao/AccountDaoImpl.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
|
|
@DaanHoogland |
no doubt, but can you be more specific? Do you mean, bypass Note |
@DaanHoogland |
…ountDao.getUserByApiKey(encodedKey)`
ok, gave it a stab, |
good, look forward to your more changes |


Description
This PR implements the reporters suggestion as requested...
Fixes: #12612
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?