-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add premium, device authed endpoint to retrieve policies #5967
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5967 +/- ##
==========================================
+ Coverage 58.66% 58.75% +0.09%
==========================================
Files 362 362
Lines 33690 33671 -19
==========================================
+ Hits 19764 19785 +21
+ Misses 11969 11927 -42
- Partials 1957 1959 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left one comment.
This reverts commit f00d6bc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #5967 (comment)
res.Body.Close() | ||
require.Len(t, listDevicePoliciesResp.Policies, 2) | ||
require.NoError(t, listDevicePoliciesResp.Err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great test!
This adds a new device authenticated endpoint,
/api/_version_/fleet/device/{token}/policies
to retrieve the device policies.An example request / response looks like:
Related to #5685, in another changeset I will be adding "client" endpoints so we can consume this endpoint from Fleet Desktop
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/
and/ororbit/changes/
).