1
0
mirror of https://github.com/ribbybibby/ssl_exporter.git synced 2025-07-12 23:50:14 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
3eab6a10fd kubernetes: use namespace selector where possible
We can use a namespace selector to only list secrets in the target namespace,
unless its a glob pattern.
2024-04-30 06:39:10 +01:00
1b8a0c3b93 Use custom User-Agent header (#178) 2024-04-28 18:54:55 +01:00
dd2a9a2e71 Add test for TRUSTED CERTIFICATE block (#177)
Not the best test in the world but at least it verifies that we read
this block into a certificate.
2024-04-28 18:16:04 +01:00
1ec0cd6dc7 fix: support parsing of openssl specific cert formats (#142) 2024-04-28 17:44:52 +01:00
515b990f52 Add http_file prober (#144)
* feat: add remote_file probe

* fix: use tls module config

* chore: write http/https tests for probing remote file

* chore: get rid of useless lines

* fix: get rid of useless file download, check body directly

* fix: use checkCertificateMetrics to actually check values

* Rename remote_file to http_file

You can fetch remote content with a lot of different protocols, so I
think it's worth being specific here.

As part of this change I've fixed up some of the logic in the code. I've
also created a separate `http_file` block in the module config.

* Actually include renamed files

---------

Co-authored-by: Anthony LE BERRE <aleberre@veepee.com>
Co-authored-by: Rob Best <rob.best@jetstack.io>
2024-04-28 16:48:09 +01:00
3424423d4a Fix tcp starttls test for smtp (#167)
* Fix tcp starttls test for smtp

* Update tcp.go

* Update tcp_test.go

* Update test/tcp.go

Co-authored-by: Rob Best <robertbest89@gmail.com>

* Update tcp_test.go

---------

Co-authored-by: Rob Best <robertbest89@gmail.com>
2024-03-22 12:13:21 +01:00
52fb44781c Amend module path for v2 2022-05-07 09:33:55 +01:00
65249bc2e7 added pop3 STARTTLS queryResponse (#84)
* added pop3 STARTTLS queryResponse

* implemented pop3 test, added pop3 starttls parameter to README

Co-authored-by: Timo Boldt <tb@teuto.net>
2021-12-31 13:47:05 +00:00
a8dcb43b44 Use FieldSelector to select only tls secrets (#82)
This speeds up the listing of certs significatnyly in clusters with many secrets.
2021-12-23 13:18:24 +00:00
43dee906c6 Support TLS renegotiation (#83)
* Support TLS renegotiation

* Bump version

* Revert version bump

* Extend TLSConfig with renegotiation support

* Update config/config.go - comment formatting

Co-authored-by: Rob Best <robertbest89@gmail.com>

* add dedicated renegotiation example

* Create local NewTLSConfig in order to incorporate local extentions

* go mod tidy

* Move TLS renegotiation parsing into UnmarshalYAML

Co-authored-by: Rob Best <robertbest89@gmail.com>
2021-12-09 08:34:59 +00:00
a94845ae5d Add support for postgresql protocol (#77)
With postgresql to initiate SSL-encrypted connection specific combination
of bytes must be sent to the server.

Message flow is described on following page
https://www.postgresql.org/docs/13/protocol-flow.html#id-1.10.5.7.11

And SSLRequest message format is described on
https://www.postgresql.org/docs/13/protocol-message-formats.html

The value of SSLRequest message becomes to bytes that is used in the code
2021-08-23 08:39:40 +01:00
83f01274fc Move to github.com/prometheus/common/promlog for logging (#71)
* Move to yaml.v3 everywhere

* Switch to github.com/prometheus/common/promlog for logging
2021-06-23 17:22:22 +01:00
5265251777 Support getting certificate information from a kubeconfig file (#61)
* Support getting certificate information from a kubeconfig file

* Support relative paths for cluster CA and user certificate in kubeconfig

* Determine relative using filepath.IsAbs

* Make relative path logic actually work, add test. Move all kubeconfig parsing into parsing specific function
2021-04-02 10:53:31 +01:00
44d8713091 Add test for TLS version metric 2020-11-19 22:53:47 +00:00
ca7aa1f14e Fix golint errors 2020-11-16 00:48:15 +00:00
13a03b1e2b Move tests to prober package 2020-11-16 00:41:36 +00:00
67539b6000 Use same results check for file + kube probes 2020-11-15 22:39:38 +00:00
63dcb9aff1 Add kubernetes prober 2020-11-15 22:12:18 +00:00
0506638f63 Add file prober 2020-11-15 13:59:51 +00:00
c74c0de901 Refactor prober function and metrics collection
The existing implementation consists of a collector that exports
information from a tls.ConnectionState returned by the prober function.
This won't necessarily integrate well with additional probers that
retrieve certs from sources other than a tls handshake (from file, for
instance).

I've made the probing more generically expandable by removing the
collector and instead registering and collecting metrics inside the
prober. This makes it possible to collect the same metrics in a
different way, or collect different metrics depending on the prober.
2020-11-07 17:17:06 +00:00
89eff28fac Add starttls for smtp, imap and ftp (#36) 2020-06-22 16:50:21 +01:00
1c8bd16057 Add proxy_url parameter to https configuration (#35)
This supports the use of more than one proxy server per exporter instance.
2020-06-17 16:48:59 +01:00
801179eae7 Move to a modules/probers model, like the blackbox_exporter. (#34)
There are a number of reasons for this change:
- Modules allow a single instance of the exporter to be configured with numerous
different tls configs. Previously you had to run a different exporter for each
combination.
- Adding new and more complicated options to the exporter should be easier with
modules than if I was to go down the route of accepting configuration directly through url params
- I prefer defining a specific prober (https,tcp) over using the URL to guess
what the user wants
2020-06-17 16:29:21 +01:00