Forum Discussion
Catch specific SSL errors/failures???
One of the requirements that I've been given is to try and catch certain SSL errors and return a more friendly error page, rather than the browser default...
A couple of the examples that have come up so far are:
* A User attempting to connect to a VIP that is enforcing client SSL certficiates but doesn't have a valid Client SSL certificate installed...
* A user attempting to connect to a VIP with an expired Client SSL certificate
* A user connecting with a very old SSL Version or Cipher...
Now the last one is nice and easy as there's plenty of reference code on the Wiki...
However I'm struggling with 1 & 2 above...
Any pointers or ideas???
Cheers
Gav
- GavinW_29074NimbostratusDamm... I've just spotted a gap in my rule...
- hooleylistCirrostratus
To request a client cert for specific URIs, you could:
set the client SSL cert mode to ignore
put the URIs you do or don't want to request a client cert for in a data group
in HTTP_REQUEST, check if the URI requires a client cert, set a variable to track that you've requested a client cert and then do:
Force renegotiation of the SSL connection with a cert requested set need_cert 1 SSL::session invalidate SSL::authenticate always SSL::authenticate depth 9 SSL::cert mode request SSL::renegotiate
On the subsequent CLIENTSSL_CLIENTCERT event, check if the client presented a valid cert. If so, allow the request. If not, send a response and block the request.
I'm not sure if it helps or over complicates things, but I tested a related iRule for selective client cert requesting. But it includes OCSP validation and was done pre-10.1.0 when the SSL::cert was cached for us for the duration of the SSL session. Anyhow, here it is:
http://devcentral.f5.com/wiki/iRules.client_cert_request_by_uri_with_ocsp_checking.ashx
If all of this looks too complicated, you could try separating the content which requires a client cert to another virtual server and then use the iRule you've already written.
Aaron
- GavinW_29074NimbostratusAaron
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com