fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Add certificates to host vitals (macOS, Windows, Linux, iOS/iPadOS, Android)

Open harrisonravazzolo opened this issue 1 year ago • 18 comments

  • customer-pingali: Gong snippets:
    • https://us-65885.app.gong.io/call?id=2699116120479648557&highlights=%5B%7B%22type%22%3A%22SHARE%22%2C%22from%22%3A370%2C%22to%22%3A458%7D%5D
    • https://us-65885.app.gong.io/call?id=26793901677443267&highlights=%5B%7B%22type%22%3A%22SHARE%22%2C%22from%22%3A648%2C%22to%22%3A888%7D%5D
  • @noahtalerman: User requested this because they can see a list the certificates on macOS, iOS, iPadOS hosts in their current MDM solution. They want to see the same list in Fleet.
    • @noahtalerman: In the interim the user can write an osquery query the ___ table to list certificates on macOS. For iOS/iPadOS, the user can use the run MDM command Fleet API w/ the List the Certificates as the custom command.
    • @noahtalerman: Eventually Fleet might add certificates to host vitals so that the IT admin can see them on the Host details page.

User stories

  • #23235
    • Feedback from customer-pingali: I'd like to see Issued By be the Common Name value and Issued At be the Not valid before value without having to click View Details on each cert.
      • @noahtalerman: Separate user story to address this feedback is here: #27567

harrisonravazzolo avatar Oct 09 '24 21:10 harrisonravazzolo

Similar to https://github.com/fleetdm/fleet/issues/20717

harrisonravazzolo avatar Oct 10 '24 00:10 harrisonravazzolo

Problem

customer-pingali would like the ability to surface this information about a device directly from MDM and not rely on osquery.

Use case: an employee with a BYOD leaves the organization and CorpIT wants to know which certs the device has and revoke them. While this is possible through osquery on Mac/Windows, it's not possible to use this method on iOS. The security queries will return the value they are looking for, certificates, but also data that would be useful for other customers to be able to query and unlock some GitOps lifecylces - i.e. Find My, Management status, Hardware encryption type

All available values: https://support.apple.com/en-gb/guide/deployment/dep5872f7b3c/1/web/1.0

What have you tried?

Not possible through Fleet.

Potential solutions

Could use osquery on supported platforms or use a custom MDM command, like what this customer is trying to do with certs - https://developer.apple.com/documentation/devicemanagement/list_the_certificates

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

Being able to hit an API, similar to the List MDM Command https://fleetdm.com/docs/rest-api/rest-api#list-mdm-commands and parse the data returned.

noahtalerman avatar Oct 17 '24 18:10 noahtalerman

  • @noahtalerman: User requested this because they want to be able to list the certificates on macOS, iOS, iPadOS hosts. What are they doing w/ this list? Building some automation? Just looking to confirm that a certificate is there?

@harrisonravazzolo can you please ask the above on your next call w/ pingali? Thanks!

Also check out the "in the interim" below:

noahtalerman avatar Oct 17 '24 19:10 noahtalerman

  • @noahtalerman: User requested this because they want to be able to list the certificates on macOS, iOS, iPadOS hosts. What are they doing w/ this list? Building some automation? Just looking to confirm that a certificate is there?

@harrisonravazzolo just following up to say that I don't think we can move this request forward to drafting/design until we understand the above.

Can you please ask the above on your next call w/ pingali? Thanks!

noahtalerman avatar Oct 21 '24 13:10 noahtalerman

https://us-65885.app.gong.io/call?id=4502089861812328304&highlights=%5B%7B%22type%22%3A%22SHARE%22%2C%22from%22%3A1366%2C%22to%22%3A1418%7D%5D

The downstream use case for the data returned is not clear on this snippet but they have potentially turned this into a requirement.

harrisonravazzolo avatar Oct 23 '24 19:10 harrisonravazzolo

@harrisonravazzolo it's still unclear what the desired workflow is.

Do they want to see a list of certificates on the Host details page? You can imagine we'd show a list like the list of users:

Screenshot 2024-10-24 at 2 23 43 PM

noahtalerman avatar Oct 24 '24 18:10 noahtalerman

Hey @noahtalerman - I can ask Pingali but yeah, I would imagine something like that, but that it's also included in the api.

Don't know how helpful this screenshot is but this is me running the command on my iPhone and getting the certs.

cert_payload

harrisonravazzolo avatar Oct 24 '24 19:10 harrisonravazzolo

Access to a lot of resources are through certs - so knowing if a device has a particular cert might mean the end user has access to the dev test wifi network, or, they have a kerberos identity for the iOS app test services, or something like that.

harrisonravazzolo avatar Oct 24 '24 19:10 harrisonravazzolo

@harrisonravazzolo heads up, we peeled this user story off this request and brought it into the current design sprint.

Keep in mind that the user story might not address the entire request. It may just be a small, iterative piece of it.

noahtalerman avatar Oct 25 '24 14:10 noahtalerman

@harrisonravazzolo @noahtalerman wondering if we ever got the answer to this question in the issue description:

What are they doing w/ this list? Building some automation? Just looking to confirm that a certificate is there?

rachaelshaw avatar Nov 04 '24 20:11 rachaelshaw

@rachaelshaw I don't think we know for sure if pingali is building an automation.

That said, I chatted w/ Allen (subject matter expert), and other MDM solutions present a list of certificates on their equivalent of the Host details page. This way, the IT admin can confirm they're present on the device. So, I think it's safe to assume that pingali is at least looking for this.

In the user story we're working on now, I think we start w/ adding certificates to the Host details page (host vitals API too).

Later, we might add a view that shows all certificates across hosts or fire webhooks when a certificate fails to install (to aid automations if they exist).

noahtalerman avatar Nov 05 '24 18:11 noahtalerman

I was able to look into this a little more.

When you run a query like SELECT * FROM certificates; it is pulling all certificates, even system root certificates that are the default, built-in certificates provided by the operating system. Admins likely don't want these listed on a host record since every host will have them and know they can dig them up through osquery if needed.

What admins are likely asking for is a UI that shows the results of SELECT * FROM certificates where path = '/Library/Keychains/System.keychain'; attached to a host since these are certificates installed on top of the defaults.

Here is what other MDMs show: Screenshot 2024-11-19 at 1 45 30 PM

Here is the osquery result of the command I suggested -- the discrepancy in results is because certificates that were installed by Jamf have been removed from the device: Screenshot 2024-11-19 at 1 46 23 PM

Here is the list of System certificates on the device: Screenshot 2024-11-19 at 1 46 36 PM

Here is the list of System Roots installed on the device which come up when running SELECT * FROM certificates; in addition to the ones in the previous screenshot: Screenshot 2024-11-19 at 1 46 41 PM

Summary: The UI should not show all certificates, only the results of SELECT * FROM certificates where path = '/Library/Keychains/System.keychain'; since these are certificates that had to be installed through some process.

allenhouchins avatar Nov 19 '24 19:11 allenhouchins

@Patagonia121 I closed this other "List certificates for Windows, Android, and Linux Devices" request.

This request here (#22802) now covers all platforms for pingali.

noahtalerman avatar Feb 14 '25 20:02 noahtalerman

@noahtalerman are we still thinking this will be in 4.65.0?

Patagonia121 avatar Feb 18 '25 15:02 Patagonia121

@Patagonia121 certificates in host vitals for macOS, iOS, and iPadOS is targeted for 4.65. That slice of this request is covered in this user story: #23235

If you click on that user story you can see that the 4.65 milestone is attatched:

Image

Windows, Android, and Linux will come later.

noahtalerman avatar Feb 19 '25 14:02 noahtalerman

Hey @Patagonia121, we shipped #23235 in 4.65.0. It's covers macOS, iOS and iPadOS. Windows, Linux, and Android are coming soon.

marko-lisica avatar Mar 17 '25 14:03 marko-lisica

  • #23235
    • Feedback from customer-pingali: I'd like to see Issued By be the Common Name value and Issued At be the Not valid before value without having to click View Details on each cert.
      • @noahtalerman: Separate user story to address this feedback is here: #27567

FYI @Patagonia121 we pulled a new user story, based on pingali's feedback, into the current design sprint. Targeting 4.68.

noahtalerman avatar Mar 27 '25 13:03 noahtalerman

  • Feedback from customer-pingali: Two more columns without having to click View details: Issued By and Issued At.

@Patagonia121 we shipped this improvement in 4.73 based on pingali's feedback (above).

I think we can let pingali know but we should also let them know that this request isn't done. We're going to show certificates for Windows and Android:

  • https://github.com/fleetdm/fleet/issues/31294

Target is 4.77^

noahtalerman avatar Sep 25 '25 13:09 noahtalerman