Forum Discussion
Can I use an IRULE?
Trying to load balance 3 web servers running Kronos Application. Need to use 443 for some security but application uses 80. Can I use an IRULE to manipulate this? With the setup now, they can go to the URL with HTTP or HTTPS. Only want HTPS.
User goes to https://time.abc.org/scf/login
Java client needs to be installed if not already. They sign in and do what they need to in the Application. Currently I have both ports 80 and 443 opened to make this work.
I did find this on the site for HTTP redirects:
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
Will this work? I really have no idea about Irules so I appologize for any stupidity! Thanks in advance!
- hoolio
Cirrostratus
Hi, - mike_schweinber
Nimbostratus
Hello, - hoolio
Cirrostratus
If it's an option to have the application reconfigured to use only HTTPS, that would be the most efficient fix. - David_Homoney
Nimbostratus
Why not setup a clientssl profile. This will allow you to keep all commo between your clients and BIGIP secure while allowing your Kronos servers to stay on port 80. - mike_schweinber
Nimbostratus
Posted By homoney on 7/25/2006 8:59 AM - John_45523
Nimbostratus
I'm having the similar problem. I set up the client side for 443 and server 80. with the IRule below it will only display the Kronos app page and not display the data from SQL database. - Michael_Yates
Nimbostratus
I think that you should be able to do it without manipulating the end application (leave it HTTP on Port 80 and use the F5 to do full SSL Offload). - r_dynamo_79563
Nimbostratus
There are some java objects that are not being rendered correctly using above setup. I tried using a stream profile with an iRule on the HTTPS VIP which correctly rendered those java objects in HTTPS. However, there is an instance whereby clicking on run report the web-app is suppose to direct you towards the report status which is failing. After clicking on "Run Report" several times, I can get an error saying undefined.
when HTTP_REQUEST { tell server not to compress response HTTP::header remove Accept-Encoding disable STREAM for request flow STREAM::disable } when HTTP_RESPONSE { catch and replace redirect headers if { [HTTP::header exists Location] } { HTTP::header replace Location [string map {"http://" "https://"} [HTTP::header Location]] } only look at text data if { [HTTP::header Content-Type] contains "text" } {
create a STREAM expression to replace any http:// with https:// STREAM::expression {@http://@https://@} enable STREAM STREAM::enable }
}
- r_dynamo_79563
Nimbostratus
I am trying to set http to https rewrites on all Server responses within Kronos. I tried Michael Yates suggestion, however some features within the web-app are not displaying at all on https. I tried using a stream profile with the irule below on the HTTPS VIP, all the features are running. However, there's a run report operation that throws an undefined javascript error upon several clicks, but the reports are generating fine. Is there any work around to ensure everything is rendered correctly on HTTPS?
when HTTP_REQUEST { tell server not to compress response HTTP::header remove Accept-Encoding disable STREAM for request flow STREAM::disable } when HTTP_RESPONSE { catch and replace redirect headers if { [HTTP::header exists Location] } { HTTP::header replace Location [string map {"http://" "https://"} [HTTP::header Location]] } only look at text data if { [HTTP::header Content-Type] contains "text" } { create a STREAM expression to replace any http:// with https:// STREAM::expression {@http://@https://@} enable STREAM STREAM::enable } }
- Brett_10751
Nimbostratus
We run Kronos 443 on the vip and port 80 to the pool and have an irule and stream profile configured like this. We are not having the issues you report, I could have sworn the kronos admin had to enable some sort of ssl offloading settings in Kronos admin page. That may be what you are missing
when HTTP_REQUEST { STREAM::disable HTTP::header remove "Accept-Encoding" } when HTTP_RESPONSE { Check if response type is text and host isn't null if {[HTTP::header value Content-Type] contains "text" and $host ne ""}{ Replace http://$host with https://$host STREAM::expression "@http://$host@https://$host@" Enable the stream filter for this response only STREAM::enable } Rewrite the Location header in redirects to https:// if { [HTTP::is_redirect] && [string tolower [HTTP::header Location]] starts_with "http://$host"} { HTTP::header replace Location [string map -nocase "http://$host https://$host" [HTTP::header Location]] } }
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