-
Notifications
You must be signed in to change notification settings - Fork 284
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
[apps::protocols::x509::plugin] certificate monitoring impossible because of user certificate #1022
Comments
A suggestion for monitoring certificate expiry in bash command used: bc, date, echo, openssl, sed echo "("$(date +%s -d "`echo | openssl s_client -connect [hostname.tld]:[port] 2>/dev/null | openssl x509 -noout -enddate | sed 's/.*notAfter=\(.*\)$/\1/g'`")"-"$(date +%s)")/86400" | bc |
Hi @ant0nwax, |
Hi @cgagnaire thanks for looking into this. root@monitoringsrv ~ # cat /etc/centos-release Hope this helps you in order to understand... I could provide log files |
Do you have a website to test it ? |
I am back to that project only in July, I will update this message here, in july |
i found this
https://stackoverflow.com/questions/38095559/https-test-server-that-checks-client-certificates
and i could test in our environment if you send me an updated script
Sent from my P9 tard-phone running Oreo. Random auto-corrects and typos
are my special gift to you.
…On Wed, Jun 19, 2019, 12:04 PM qgarnier ***@***.***> wrote:
Do you have a website to test it ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1022?email_source=notifications&email_token=AH7N7TFR3MZPC3L3MVRWENLP3IADPA5CNFSM4FFXLJJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBLXXI#issuecomment-503495645>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH7N7TH4BV4LA7WLX4MSE2LP3IADPANCNFSM4FFXLJJA>
.
|
I don't reproduce your errors with test website from the thread 'stackoverflow'. |
it is working yes, because the certificate you check is on https:// and the current script cannot check https:// /secure I assume ? |
cannot edit last post for unknown reason, so I post again: root@magicaltestserver ~ # /usr/bin/perl /usr/lib64/nagios/centreon-plugins/centreon_plugins.pl --plugin apps::protocols::x509::plugin --mode validity --validity-mode expiration --ssl-opt="SSL_verify_mode=SSL_VERIFY_NONE" --critical-date '30:' --warning-date '60:' --hostname server.cryptomix.com/secure --port 443 |
There is an issue with your hostname here:
|
Hi Quentin
There is a certificate monitor included in centreon (x509)
So i tried now half a day to solve this and finally found the issue with debugging using s_client
centreon shows this: (it is working with other certificates)
s_client shows this:
Note as well the line
SSL alert number 40
That indicates the server won't accept the connection because no user certificate was presented (complete the command line).
You can use OpenSSL to check a user certificate is presented to a server that need it. You then have to specify the user certificate and the private ke with the -cert et -key parameters.
so in this case the --ssl-opt="SSL_verify_mode=SSL_VERIFY_NONE" is not usable, do you have any idea how we could get this certificate monitored? I searched already one hour in the net, and did not really find software for simulating a user certificate, maybe it would not be needed if you could tweak the code?
Thanks a lot and have a great day
The text was updated successfully, but these errors were encountered: