Skip to content
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

Handle Fleet Desktop /api/_version_/fleet/device/{token}... API Premium Endpoints #5806

Closed
Tracked by #5684
lucasmrod opened this issue May 19, 2022 · 7 comments
Closed
Tracked by #5684
Assignees
Labels
~backend Backend-related issue. ~fleet-desktop Involves changes to Fleet Desktop #legacy-platform-group Legacy: platform group
Milestone

Comments

@lucasmrod
Copy link
Member

lucasmrod commented May 19, 2022

What

Some Fleet Desktop features are only available for premiums installs:

Goal

This issue has two sides:

  • Fleet Server: Make sure to return license errors when requesting premium data on non-premium deployments on /api/_version_/fleet/device/{token}... API endpoints.
  • Fleet Desktop: Have the Fleet Desktop application support parsing those errors (and retry) accordingly.
@lucasmrod lucasmrod added ~backend Backend-related issue. ~fleet-desktop Involves changes to Fleet Desktop labels May 19, 2022
@lukeheath
Copy link
Member

@lucasmrod If we add the license object to the /fleet/device/{token} endpoint, do we need error responses? There won't be any additional requests needed (for now), we just need to know if the license is free or premium to determine if we should show the red dot icon in the system tray.

  "license": {
    "tier": "premium",
    "organization": "fleet-loadtest",
    "device_count": 999999,
    "expiration": "2025-06-30T19:00:00-05:00",
    "note": "Fleet internal use only"
  },

@lukeheath lukeheath added the ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists) label May 19, 2022
@lukeheath lukeheath moved this to 🥚 Ready in 🚀 Release May 19, 2022
@lukeheath
Copy link
Member

lukeheath commented May 19, 2022

@lucasmrod I'm suggesting we re-spec this ticket to be simply "add license object to /fleet/device/{token} response". Unless I'm missing something (which is certainly possible!) that should give us what we need for this release.

@lucasmrod
Copy link
Member Author

Correct. Not a blocker for this release.

But for next release we want to change the API we use for "polling for policies every X minutes" in the tray application. And such new Fleet API should fail if the deployment is not premium (and the tray app should handle such failure).

Does that make sense?

@lukeheath
Copy link
Member

Got it. I'll leave this ticket out for now and spec a new one for the immediate fix.

Question: If fleet desktop sees the user is on a free license, could we just not make the requests? Seems like it might be simpler to implement than error parsing.

@lukeheath lukeheath removed the ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists) label May 19, 2022
@lukeheath lukeheath removed this from 🚀 Release May 19, 2022
@noahtalerman
Copy link
Member

@lucasmrod I added the list of Fleet Desktop features that are only available for premiums installs to the issue description.

@lucasmrod
Copy link
Member Author

Question: If fleet desktop sees the user is on a free license, could we just not make the requests? Seems like it might be simpler to implement than error parsing.

Agree. First version could just do this.

  • I was thinking on error handling in case deployments that go from free to premium, then Fleet Desktop would eventually show the premium features.
  • And Fleet Server should return the license errors on non-premium deployments so that non-premium users cannot use the /device/API to retrieve such premium data.

@roperzh roperzh self-assigned this May 26, 2022
@roperzh
Copy link
Contributor

roperzh commented May 30, 2022

When #5967 gets merged, we will have two device endpoints with premium data:

a. GET /api/_version_/fleet/device/{token} (because it contains a policies array)
b. GET /api/_version_/fleet/device/{token}/policies

I will modify a to only include policy information for premium users, this way the UI can remain untouched (at least as far as I can tell by looking at the code)

@roperzh roperzh moved this to 🥚 Ready in 🚀 Release Jun 1, 2022
@roperzh roperzh added the 3 label Jun 1, 2022
@roperzh roperzh moved this from 🥚 Ready to ✨ ‎ ‎In review in 🚀 Release Jun 1, 2022
@roperzh roperzh moved this from ✨ ‎ ‎In review to 🐣 In progress in 🚀 Release Jun 1, 2022
@roperzh roperzh added the #legacy-platform-group Legacy: platform group label Jun 1, 2022
@roperzh roperzh moved this from 🐣 In progress to ✨ ‎ ‎In review in 🚀 Release Jun 3, 2022
@roperzh roperzh moved this from ✨ ‎ ‎In review to ✔️ ‎ ‎‎‎Awaiting QA in 🚀 Release Jun 7, 2022
@xpkoala xpkoala moved this from ✔️ ‎ ‎‎‎Awaiting QA to ✅ Ready for release in 🚀 Release Jun 15, 2022
@lukeheath lukeheath added this to the 4.16.0 milestone Jun 21, 2022
Repository owner moved this from ✅ Ready for release to ✔️ ‎ ‎‎‎Awaiting QA in 🚀 Release Jun 21, 2022
@lukeheath lukeheath moved this from ✔️ ‎ ‎‎‎Awaiting QA to ✅ Ready for release in 🚀 Release Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~backend Backend-related issue. ~fleet-desktop Involves changes to Fleet Desktop #legacy-platform-group Legacy: platform group
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants