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 additional details for OpenSSL-style keys #8314

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kcreyts
Copy link
Contributor

@kcreyts kcreyts commented Apr 22, 2024

This PR introduces additional columns which use OpenSSL macros to get additional details about PEM keys in user .ssh/ directories.

  • "key_length" uses OpenSSL's EVP_PKEY_bits to get the cryptographic length of the cryptosystem to which the private key belongs, in bits. Definition of cryptographic length is specific to cryptosystem.
  • "key_security_bits" uses OpenSSL's EVP_PKEY_security_bits to get the number of security bits of the given key (bits of security as defined in NIST SP800-57).
  • "key_group_name" uses OpenSSL's EVP_PKEY_get_group_name to get the group of the private key. Supported for a subset of key_types implemented by OpenSSL.

@kcreyts kcreyts requested review from a team as code owners April 22, 2024 21:51
Copy link

linux-foundation-easycla bot commented Apr 22, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Seems simple, nice. Can you add this to the table integration tests?

osquery/tables/system/ssh_keys.cpp Outdated Show resolved Hide resolved
@kcreyts
Copy link
Contributor Author

kcreyts commented Apr 25, 2024

extended integration testing.

Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Seems okay to me. Thank you so much!

@directionless directionless added this to the 5.13 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants