Forum Discussion
Dirk_Laan_18877
Nimbostratus
Jul 18, 2006problem migrate cert rule from version 4 to 9
Hello,
I'm trying to get the folling rule to work on my bigip with version 9.x
I have a rule that worked fine on the bigip that is running 4.x
but on the bigip with version 9.x it still gives me the error that i did not have a client cert
the rule from version 4.x:
if (http_header("SSLClientCertStatus") == one of ccert_ok) {
use pool Portal-apps
}
else if (http_header("SSLClientCertStatus") == "NoClientCert") {
redirect to "https://test.test.nl/errors/cert_error.htm"
}
else {
redirect to "https://test.test.nl/errors/nocert.htm"
}
the rule from version 9.x:
i've created the class
when HTTP_REQUEST {
set hdr [HTTP::header "SSLClientCertStatus"]
if { [matchclass $hdr equals $::ccert_ok] } {
pool portal-apps
} elseif { $hdr equals "NoClientCert" } {
HTTP::redirect "https://test.test.nl/errors/nocert.htm"
} else {
HTTP::redirect "https://test.test.nl/errors/cert_error.htm"
}
}
any help would be great
- iControl is our remote management API. If you would post this to our iRules forum, we'll see if we can help you out.
- Dirk_Laan_18877
Nimbostratus
Hello Joe, - I'll comment here, but next time or for future iRules questions please post them to the iRules forum.
when HTTP_REQUEST { set hdr [HTTP::header "SSLClientCertStatus"] log local0. "SSLClientCertStatus header value: $hdr" if { [matchclass $hdr equals $::ccert_ok] } { log local0. "found header match in ccert_ok class" pool portal-apps } elseif { $hdr equals "NoClientCert" } { log local0. "No match found in ccert_ok class and header equals "NoClientCert" HTTP::redirect "https://test.test.nl/errors/nocert.htm" } else { log local0. "No match in ccert_ok and header doesn't equal NoClientCert" HTTP::redirect "https://test.test.nl/errors/cert_error.htm" } }
- Dirk_Laan_18877
Nimbostratus
The results of the log: - Looks like your client request has no header value of SSLClientCertStatus. No way of getting the iRule to work if the browser isn't sending that header. I didn't see any reference in your v4 rule of inserting the header. Where is this header coming from?
- Dirk_Laan_18877
Nimbostratus
the rule on version 4 worked: - Hille_de_Graaf_
Nimbostratus
Hi Joe,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects