Update `user_ssh_keys` with additional details for OpenSSL-style keys by kcreyts · Pull Request #8314 · osquery/osquery

Conversation

@kcreyts

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.

@linux-foundation-easycla

CLA Signed

The committers listed above are authorized under a signed CLA.

directionless

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?

@kcreyts

extended integration testing.

directionless

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 changed the title add additional details for OpenSSL-style keys Update user_ssh_keys with additional details for OpenSSL-style keys

Jun 20, 2024

Labels