fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.93k stars 409 forks source link

Add "Fedora Linux" label to `GET /host_summary` #21409

Open nonpunctual opened 3 weeks ago

nonpunctual commented 3 weeks ago

Goal

User story
As a user hitting the GET /host_summary API endpoint here,
I want to see a "Fedora Linux" label
so that I can add the count of Fedora Linux hosts to my custom/third-party dashboard tool.

Context

Changes

Product

Engineering

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming successful completion of QA.
iansltx commented 3 weeks ago

Assuming this is because there are a significant number of hosts running Fedora, we probably also want to map them in vuln scanning (by adding relevant OVALs). Piggybacking on this as "better support for Fedora hosts" feels like a cohesive topic for Feature Fest.

nonpunctual commented 3 weeks ago

@phtardif1 @noahtalerman @marko-lisica @iansltx This is a customer promise for the prospect tagged on the issue. Thanks.

iansltx commented 3 weeks ago

Looking further at vuln scanning, I misspoke. We map Fedora vulns to associated RHELs, build in #6242 and updated in #15174. So never mind out my tag-on here.

noahtalerman commented 2 weeks ago

Hey @nonpunctual what workflow are they trying to accomplish? i.e. what page is the user trying to filter on? Are they using this filter in a automated workflow? (API)

Design capacity: S assuming this is about filtering hosts on the Hosts page by Fedora hosts.

rachaelshaw commented 2 weeks ago

Updating issue description. Original feature request below:

Problem

centos is the closest option currently in Fleet to Fedora, but, the details query does not account for Fedora hosts via the centos builtin label.

What have you tried?

The builtin query for centos is: SELECT 1 FROM os_version WHERE platform = 'centos' OR name LIKE '%centos%'

Potential solutions

Add "All Fedora Hosts" as builtin label option

See: https://fleetdm.com/docs/rest-api/rest-api#default-response32

What is the expected workflow as a result of your proposal?

Admins would be able to easily use "All Fedora Hosts" as a label selection.

noahtalerman commented 1 week ago

Hey @rachaelshaw heads up that I updated the title and story to clarify that this is about adding the label to the API only: https://fleetdm.com/docs/rest-api/rest-api#get-hosts-summary

@dherder and @nonpunctual does this user story and solution (see issue description for API changes) work for pospect-redwine?

Note that Fleet today only exposes macOS, Windows, Linux (All Linux), Chromebooks, iPhones, and iPads:

Screenshot 2024-09-03 at 5 41 28 PM

After we ship this story that won't change.

dherder commented 1 week ago

Thanks for the clarification @noahtalerman Brock wisely asked prospect-redwine for confirmation.

mostlikelee commented 1 week ago
osquery> select * from os_version;
         name = Fedora Linux
      version = Fedora release 38 (Thirty Eight)
        major = 38
        minor = 0
        patch = 0
        build = 
     platform = rhel
platform_like = rhel
     codename = 
         arch = aarch64