Opened 5 years ago

Closed 3 years ago

Last modified 20 months ago

#599 closed patch (fixed)

Munin should be able to check the Subject DN in an X.509 Certificate when doing SSL/TLS

Reported by: e_tews Owned by: nobody
Priority: normal Milestone: Z-later
Component: master Version: 1.3.4
Severity: major Keywords: ssl, tls, certificate, sdn
Cc:

Description

Hi

I would like to configure munin in a way, so that the SDN in an X.509 certificate is checked, when doing SSL/TLS. Just having a certificate signed by a CA is not sufficient. I have written a patch for that.

The patch contains some debugging output which can be removed.

Attachments (1)

munin-tls-sdn.patch (6.4 KB) - added by e_tews 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by e_tews

comment:1 Changed 4 years ago by janl

  • Owner changed from nobody to kjellm

We want this. Unfortunately it's too hard for myself to integrate it into the current trunk. Deferring.

comment:2 Changed 4 years ago by janl

  • Milestone set to Munin 1.4
  • Type changed from enhancement to patch

comment:3 Changed 4 years ago by janl

  • Milestone changed from Munin 1.4 to Munin 1.5

comment:4 Changed 3 years ago by janl

  • Owner changed from kjellm to nobody

comment:5 Changed 3 years ago by snide

  • Milestone changed from Munin 1.5 to Z-later

Pushing it for a later time since I don't know how to handle it for 1.5.

If someone has the skill to test/integrate the provided patch, he just has to set the correct milestone.

comment:6 Changed 3 years ago by bldewolf

  • Resolution set to fixed
  • Status changed from new to closed

Unfortunately, SSLeay is working against us when we try to do this. The patch that's submitted adds the code for verifying the SDN to the verify_certificate callback because that is where we can access the client certificate and choose specific fields. Unfortunately, this callback is used for both the local and remote certs, so this check could potentially fail on the local cert and mark the remote cert as untrusted.

Outside of the callback, I can't find a way to retrieve just the SDN or certain parts of the cert. I was hoping to be able to make a directive for matching just the CN, or verifying the CN matches reverse DNS, but I can't find any functions in SSLeay for inspection of certificates from the data structures available outside of the verification callback.

The best I can find is the dump certificate string, which does contain the SDN along with the Issuer DN. In r3483, I've added a directive named "tls_match" which is a regex applied to this string if it exists. In this way, one can match on the SDN. I've added more detail to the man page for munin.conf and munin-node.conf.

Note: See TracTickets for help on using tickets.