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

#23235 API docs: Add certificates to host vitals for macOS, iOS, iPadOS #25317

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions docs/REST API/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2757,6 +2757,32 @@ Returns the information of the specified host.
"label_membership_type": "dynamic"
}
],
"certificates": [ // Available for macOS/iOS/iPadOS hosts
{
"id": 3,
"not_valid_after": "2021-08-19T02:02:17Z",
"not_valid_before": "2021-08-19T02:02:17Z",
"certificate_authority": true,
"common_name": "FleetDM",
"key_algorithm": "rsaEncryption",
"key_strength": 2048,
"key_usage": "CRL Sign, Key Cert Sign",
"serial": 1,
"signing_algorithm": "sha256WithRSAEncryption",
"subject": {
"country": "US",
"organization": "Fleet Device Management Inc.",
"organizational_unit": "Fleet Device Management Inc.",
"common_name": "FleetDM"
},
"issuer": {
"country": "US",
"organization": "Fleet Device Management Inc.",
"organizational_unit": "Fleet Device Management Inc.",
"common_name": "FleetDM"
},
Comment on lines +2772 to +2783
Copy link
Member Author

@rachaelshaw rachaelshaw Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev note:

subject and issuer data from osquery looks like this:

/C=US/O=Fleet Device Management Inc./OU=Fleet Device Management Inc./CN=FleetDM

Ccountry
Oorganization
OUorganizational_unit
CNcommon_name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the number of potential certs on a device I don't think we should stuff all of this into host details.

My recommendation is that we have the list with total count and the first 5 name expiry and id.

Then a separate paginated response for full cert details.

}
],
Comment on lines +2760 to +2785
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev note:

Omitted from response if platform is not macOS, iOS, or iPadOS.

"packs": [],
"policies": [
{
Expand Down Expand Up @@ -3202,6 +3228,32 @@ This is the API route used by the **My device** page in Fleet desktop to display
"label_membership_type": "dynamic"
}
],
"certificates": [ // Available for macOS/iOS/iPadOS hosts
{
"id": 3,
"not_valid_after": "2021-08-19T02:02:17Z",
"not_valid_before": "2021-08-19T02:02:17Z",
"certificate_authority": true,
"common_name": "FleetDM",
"key_algorithm": "rsaEncryption",
"key_strength": 2048,
"key_usage": "CRL Sign, Key Cert Sign",
"serial": 1,
"signing_algorithm": "sha256WithRSAEncryption",
"subject": {
"country": "US",
"organization": "Fleet Device Management Inc.",
"organizational_unit": "Fleet Device Management Inc.",
"common_name": "FleetDM"
},
"issuer": {
"country": "US",
"organization": "Fleet Device Management Inc.",
"organizational_unit": "Fleet Device Management Inc.",
"common_name": "FleetDM"
},
}
],
Comment on lines +3231 to +3256
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev note:

Omitted from response if platform is not macOS, iOS, or iPadOS.

"software": [
{
"id": 321,
Expand Down
Loading