Improve server certificate validation in client

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby

Research direction

Start by tracing the client connection and the OpenSSL::SSL::SSLSocket#post_connection_check entry point mentioned in the issue. The work is complete when the client validates the server certificate hostname after the handshake, using the stated certificate fields, with a way to disable the check for testing.

Written by the indexing model from the issue text.

Description

enhancement

The logstash-forwarder and filebeat certificate validation will also check the server certificate domain name. For openssl this check must be done by the library user after connecting to a server.

For FQDN validation of server certificate the client should use the servers certificate after the handshake (connect) to search for the domain name in the X.509 extension fields with fallback to the commonName field. This check is required to prevent potential man-in-the middle attacks.

The ruby openssl module already provides post_connection_check. But post_connection_check must be called by developer.

It should be possible to disable this check for testing purposes.

Dominant language
Ruby
Stars
3
Forks
17
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elastic/ruby-lumberjack

All issues in elastic/ruby-lumberjack

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.