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 osquery_platform table #5488

Closed
wants to merge 3 commits into from

Conversation

directionless
Copy link
Member

This adds an osquery_platform table. This exposes the existing PlatformType bit mask, as well as boolean columns for the existing isPlatform types.

@facebook-github-bot facebook-github-bot added the cla signed Automated label: Pull Request author has signed the osquery CLA label Mar 1, 2019
@fmanco
Copy link
Contributor

fmanco commented Mar 1, 2019

What is the use-case here? Why not just rely on os_version table?

@directionless
Copy link
Member Author

I want to know what osquery itself thought the platform was, and by extension, which table schemas would be present.

os_version.platform and os_version.platform_like are very different. Those derive from OS presented information, are somewhat incorrect, and can only be manually correlated. with the osquery platforms. Some examples:

  • mac laptop: darwin,darwin -- No indication posix or bsd
  • ubuntu server: Ubuntu,debian -- No indication of posix linux
  • centos host: rhel,rhel -- No indication of centos, let alone posix or linux

@terracatta
Copy link
Contributor

@fmanco this information is critical to know when enrolling a device in TLS (in fact it is sent during the enrollment request for the remote TLS API).

Unfortunately there is no way to dynamically query this information later after the enrollment phase. It just seems strange that something so important to how Osquery identifies systems internally is actually not accessible through a virtual table.

@fossam
Copy link

fossam commented Mar 1, 2019

+1
It would be useful.

But having a table all by itself for this also feels awkward. system_info, osquery_info ?

@directionless
Copy link
Member Author

@fossam Mostly the columns felt better named in a dedicate table, than adding it elsewhere. Especially if the list of IsPlatform things grows. But, I'm happy to move it. Mostly I wanted the functionality, I'm less picky about where

@directionless directionless changed the base branch from experimental to master June 25, 2019 01:51
This adds an osquery_platform table. This exposes the existing PlatformType bit mask, as well as boolean columns for the existing `isPlatform` types
@theopolis
Copy link
Member

This info in a dedicated table seems like overkill. Can you make this work with just the bitmask in osquery_info?

@directionless
Copy link
Member Author

I could, yes. My thinking here was that it was easier to work with, and it becames self contained. I'm not sure the bitmask will be stable across versions.

@theopolis
Copy link
Member

Is this still info we want?

@directionless
Copy link
Member Author

I would find this content useful, yes. It also feels like something we should expose.

I am agnostic whether to add this to a new table, or expand one of the existing ones.

Code should be mergeable.

@theopolis
Copy link
Member

Let's abandon this and go for a platform_mask column in osquery_info.

@theopolis theopolis closed this Oct 16, 2019
directionless added a commit to directionless/osquery that referenced this pull request Oct 18, 2019
Right now, there is no way to tell what platform osquery is running on. We have `os_version.platform` and `os_version.platform_like`, but they are highly inconsistent, and require a lot of custom parsing to use. We should expose the underlying platform bitmask.

This adds the `platform_mask` to the `osquery_info` table.

This replaces osquery#5488
directionless added a commit to directionless/osquery that referenced this pull request Oct 18, 2019
Right now, there is no way to tell what platform osquery is running on. We have `os_version.platform` and `os_version.platform_like`, but they are highly inconsistent, and require a lot of custom parsing to use. We should expose the underlying platform bitmask.

This adds the `platform_mask` to the `osquery_info` table.

This replaces osquery#5488
@directionless directionless mentioned this pull request Oct 18, 2019
theopolis pushed a commit that referenced this pull request Oct 23, 2019
Right now, there is no way to tell what platform osquery is running on. We have `os_version.platform` and `os_version.platform_like`, but they are highly inconsistent, and require a lot of custom parsing to use. We should expose the underlying platform bitmask.

This adds the `platform_mask` to the `osquery_info` table.

This replaces #5488
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Automated label: Pull Request author has signed the osquery CLA needs response virtual tables
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants