Forum Discussion
Authentication and authorization: how to force an iRule to connect to a server on Internet via HTTPS?
Let's say I have a server on Internet (let's call it CRED), which receives a request, checks if access is allowed and responses with some data (allow access or reject).
I have an LTM with a lots of web servers running an application. Every time a user communicates with my application, a web application needs to make a request to CRED to see if the user is allowed to see requested content.
CRED is like 3rd party authentication and authorization server.
I want to write an iRule, which will keep track of user connections and can check if an user is allowed to request the content.
I have played with "Sideband Connections" https://devcentral.f5.com/articles/v11-irules-intro-to-sideband-connections, and I managed to write iRule based on the example which connects to CRED and makes HTTP request.
The problem is that it makes raw connections and it won't work with SSL (HTTPS). I need to negotiate an SSL handshake before I can do requests like "GET /mypage/myindex2.html HTTP/1.0\r\n\r\n".
To sum up, that's what I want:
- A user makes a request to my web app via LTM
- A request comes on LTM and hit an iRule
- The iRule establishes a SSL connection to CRED on Internet, on port 443.
- After connection is established, the iRule makes a request like "GET /mypage/myindex2.html HTTP/1.0\r\n\r\n"
- The iRule receives data and closes the connection to CRED
- The iRule makes a decision if a user is allowed to see requested url.
- The user gets requested data or his session is rejected/forwarded to another page.
What is the best way to implement it?
1 Reply
- Kevin_Stewart
Employee
The only way to make an SSL connection through a sideband call is to point your sideband call at a local VIP that applies server side SSL. So
- A user makes a request to my web app via LTM
- A request comes on LTM and hit an iRule
- The iRule establishes a non-SSL connection to a local VIP that load balances to CRED on Internet and applies a server SSL profile to do HTTPS to CRED, on port 443.
- After connection is established, the iRule makes a request like "GET /mypage/myindex2.html HTTP/1.0\r\n\r\n"
- The iRule receives data and closes the connection to CRED
- The iRule makes a decision if a user is allowed to see requested url.
- The user gets requested data or his session is rejected/forwarded to another page.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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