Add httpTokens end points for Devices#7568
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7568 +/- ##
==========================================
- Coverage 76.95% 76.95% -0.01%
==========================================
Files 410 410
Lines 21002 21084 +82
Branches 5117 5138 +21
==========================================
+ Hits 16162 16225 +63
- Misses 4840 4859 +19
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:
|
There was a problem hiding this comment.
Gave it a good looking over. I notice the root registration changed from /api/v1/projects/:projectId/httpTokens to /api/v1 but that the existing child paths and new device/ child paths have been implemented in forge/ee/routes/httpTokens/index.js for all 4 verbs - all looks good - happy to approve.
NOTE Since this will be called by/for Insights on devices (my current work tasks) - I would hope to see this merged sooner rather than later so I can incorporate my changes atop it. Is there anything blocking merge? I realised merging it would create backend functionality that has no FE component but that should be ok right?
PS: Will FE offering of token creation for devices be gated by device agent version?
nitpick
the 404 failure path in the pre-handler is not covered (for regression purposes) for existing instances and new devices requests.
I don't think there's a real issue merging sooner. The api will be discoverable, but the device tokens won't be usable until the device agent release. The UI will notify the user it requires DA v4 or later. |
|
Going to add a couple more tests then this is GTM |
Closes #7564
REVIEW - BUT DO NOT MERGE YET
httpTokensroute code to handle bothprojectanddevicelevel access.http:deviceownerType for access tokenshttp:deviceownerTypeNot to be merged until