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

Add operating systems table and update related endpoints #6475

Closed
4 tasks done
lukeheath opened this issue Jul 1, 2022 · 5 comments
Closed
4 tasks done

Add operating systems table and update related endpoints #6475

lukeheath opened this issue Jul 1, 2022 · 5 comments
Assignees
Labels
~backend Backend-related issue. ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists)
Milestone

Comments

@lukeheath
Copy link
Member

lukeheath commented Jul 1, 2022

Problem

I'm an engineer managing thousands of hosts and I'm overwhelmed with tracking my security goals for each of these hosts.

This makes is hard to achieve my security goals because it's difficult to find which hosts are in an undesired state and, when I do, it's difficult to ask these hosts, and their users, why they're in an undesired state.

Goal

Add ability to know which Windows hosts are running Windows versions that are no longer supported (undesired). Also, add ability to know why hosts are running unsupported Windows versions.

Figma

https://www.figma.com/file/hdALBDsrti77QuDNSzLdkx/%F0%9F%9A%A7-Fleet-EE-(dev-ready%2C-scratchpad)?node-id=7646%3A274008

Related

Tasks

1

  • Add new operating_systems table.
  • column name contains OS name (i.e. "Windows 10 Enterprise", "Mac OS X")
  • column version contains alphanumeric OS version (i.e. "21H2", "12.4")
  • For Windows, the data is retrieved from the following osquery query: select data from registry where path = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion'
  • For MacOS and Linux, we should already be querying this data to populate the host.os_version column.

2

  • Add new host_operating_system pivot table.
  • Add DB migration to populate new pivot table with all hosts and their related operating system.
  • This migration will also populate the operating_systems table.
    Note: Migrations will only include the creation of the new tables. Other data will be populated the next time a host reports detail query results (by default, detail queries are reported once per hour). As a result, if a host is offline hosts at the time of the migration, it not be reflected in the new tables until its next checkin.

3

  • Add new os_version query params to the GET /hosts endpoint.
  • It will receive an id for the related OS version record in the new host_operating_systemoperating_systems table.

4

  • Update GET /os_versions endpoint to return version data from the new host_operating_systemoperating_systems table.
  • Return the current host.os_version value in the name property. This is so we don't introduce a breaking change.
  • Add new version property for the alphanumeric version.
  • Add new name_only property. This is a temporary property we will use until we introduce breaking changes in v5.
  • Ensure operating system filter can be applied on API response using URL params. URL includes “operating_system_id” when an operating system filter is applied: /hosts/manage?operating_system_id=2
@lukeheath lukeheath added ~backend Backend-related issue. ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists) labels Jul 1, 2022
@lukeheath lukeheath changed the title Add new os_version query param to GET /hosts endpoint Update GET /hosts and GET /os_version endpoints Jul 1, 2022
@lukeheath lukeheath changed the title Update GET /hosts and GET /os_version endpoints Add operating systems table and update related endpoints Jul 5, 2022
@noahtalerman noahtalerman added the 8 label Jul 5, 2022
@gillespi314
Copy link
Contributor

gillespi314 commented Jul 5, 2022

Ensure operating system filter can be applied on API response using URL params. URL includes “/operating_system_id” when an operating system filter is applied: /hosts/manage/operating_system_id=2

@lukeheath did you mean /hosts/manage?operating_system_id=2?

We use query params for similar filters (for example, software_id)

@lukeheath
Copy link
Member Author

lukeheath commented Jul 5, 2022

@gillespi314

did you mean /hosts/manage?operating_system_id=2?

Yes, thank you! Fixed.

@lukeheath
Copy link
Member Author

@gillespi314 Now that we're in a new release just wanted to check in on the status of this and get a ballpark ETA. Hoping to get the frontend portion of this into the current release. Thanks!

@gillespi314
Copy link
Contributor

@lukeheath I think we'll be able to make this release. Hoping to get the backend portion landed this week. As far as frontend blockers, I think the API specs are not going to change and should be pretty straightforward to mock if folks are ready to get started on the frontend in parallel (and of course I'm available to answer any questions that come up there).

@lukeheath
Copy link
Member Author

@ghernandez345 This is the backend ticket for #6499 assigned to you. Please sync up with Sarah as necessary to complete this work. We have a mock API client that you can use to develop the frontend against before the API is ready if needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~backend Backend-related issue. ~legacy-interface-product-group Associated with the legacy "interface" product group. (No longer exists)
Development

No branches or pull requests

3 participants