-
Notifications
You must be signed in to change notification settings - Fork 102
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 support for check TLSA records (DANE) #38
Comments
Interesting. I see there's this library: https://github.com/shuque/dane. Perhaps I could integrate that. I'll have to study it a bit more. |
Cool! Thanks |
TLSA record checking would be a very nice feature! 👍 |
I've started implementing TLSA checking on this branch: https://github.com/ribbybibby/ssl_exporter/tree/dane-verification. If anyone following this issue has some examples of DANE/TLSA in their org then I'd appreciate them trying to run it and probe their targets. I've only found a couple of publicly available targets to validate against. I think I've captured the basic usages as laid out in the RFCs but I know I'm missing some edge cases (there's some special logic to do with smtp). If anyone has deep knowledge of the spec I'd appreciate any comments on the logic here: https://github.com/ribbybibby/ssl_exporter/blob/dane-verification/prober/tls.go#L126-L169 |
Wow, I will check when have time, it good news. I can install test branchand and I have smtp targets to do testing. Thank you Update: I wrote you in linkedin 😊 |
Hello, I am acually more interested in the resulting metrics than the result of the check as such. Well, both. Let me describe my usecase so you know where I am coming from. Background Usecase
The TLSA records I use have the following properties:
With three "matching types" I have 3 TLSA records per keytype per service, meaning 6 all in all because I have both RSA and ECDSA keys:
Proposal This could produce the following TLSA specific metrics, one for each combination of keytype, usage, selector and matchingtype found in DNS:
Let's say I forgot to add a 3 1 2 TLSA record for the ECDSA key for unicast.censurfridns.dk, that metric would be missing:
or if it didn't match the presented key it would return a 0:
My usecase with anycast servers means I have some names with many TLSA records because many servers have the same name but different keys. This means I am happy if my key matches one of the TLSA records (of each type) but I don't care that more TLSA records exist which do not match the servers key. Other usecases will be opposite, so adding a metric which counts matching and not-matching TLSA records (of each type) would be a good idea, most people will want non-matching to stay at 0 unless they have something complex or anycast-ish going:
Sorry this became so long. I am available on IRC as tykling on the major networks, HMU if you do IRC. :) ps. Since the servers (all mentioned on the blogpost) are public and reachable from everywhere you are welcome to prod them on ports 443 and 853 and look at their TLSA records in the DNS! |
Thank you so much for the detailed proposal @tykling. So essentially, there are two things the exporter could be doing here:
Perhaps in addition to the validation we could do something like:
Where a value of Then you could do something like this to identify non-matching results:
I think the key type is a separate concern from TLSA and should probably form part of a separate issue in GH. You may want to monitor the key type in contexts other than TLSA. Thinking off the top of my head, perhaps we could support an option to provide a list of preferred cipher suites and then also export the key info in a new metric or possibly as another label on our |
Responded to the feedback from @dragoangel here: 4a18f54#commitcomment-45185968 |
I doesn't find any Prometheus exporter which allow this functionality, so this will be unique future.
TLSA records works on DNSSEC signed zones and allow to authenticate host even with certificate issued via not publicly trusted CA, or add pinning of existing trusted certificate to DNS layer to provide more security.
At current state enabling TLSA for SSL connections gives most of profit for Mail servers. F.e.: Postfix start to work with mandatory encryption when it detect TLSA record for MX record and not allow to downgrade to plain text.
Monitoring of TLSA is important as incorrect value in TLSA record mean untrusted SSL connection from client side which support DANE validation.
Here is short description:
https://en.wikipedia.org/wiki/DNS-based_Authentication_of_Named_Entities
And some other opensource tools description, maybe it can help with ideas:
https://www.internetsociety.org/blog/2017/12/monitoring-your-dane-deployment/
https://github.com/siccegge/dane-monitoring-plugins
The text was updated successfully, but these errors were encountered: