Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Web link that would include a page variable

To move a legacy application to an F5 APM I need to include a logon page variable with invitations to the logon site. The legacy solution uses a custom URL for individual users who are invited. Something like visit.mypage.com/my.policy?user="14542" would need to be used to mimic that solution on the F5. Adding the variable in the few ways I know doesn't seem to work, I'm not sure if this is even possible.

0
Rate this Question
Comments on this Question
Comment made 26-Apr-2016 by Theo 380
To clarify, you want to check in your Access Policy whether certain elements from the URL exist (e.g. the Query String has a user attribute?
0
Comment made 26-Apr-2016 by RobC 53
Yes, but if the URL contains a username I need to populate the username field. The URL; view.mysite.com/my.policy?input_1=user1 would populate the input_1 web site field and also allow the user to enter a username manually. Yann's idea may be a step in the right direction if I use 2 logon pages, one using his solution and another that has the username field visible and allows a user to enter a name manually.
0

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hello,

I'm not sure to understand exactly your needs but you may have use of irule similar to this one :

when HTTP_REQUEST {
    set user [URI::query [HTTP::uri] user]
    set enabled 0
    if { [HTTP::path] equals "/my.policy" and $user != "" } {
        set enabled 1
    }
}
when HTTP_RESPONSE {
    if { $enabled eq 1 and [HTTP::cookie exists MRHSession] } {
        ACCESS::session data set -sid [HTTP::cookie MRHSession] session.logon.last.username $user
    }
}

And define a logon page only with a password input within the VPE.

0
Comments on this Answer
Comment made 26-Apr-2016 by RobC 53
Thanks, Yann but I need to preserve the existing page structure. I do like you thoughts on this and will keep your answer filed away for future use.
0
Comment made 26-Apr-2016 by Yann Desmarest 3911
Hello, What is the workflow you required to follow ?
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

APM has a concept called "Landing URI".

This is a session variable that is set when a user first visits the APM and gets a session cookie. This variable can be used during Access Policy evaluation, just like any other session variable.

For example, if you hit APM with:

https://my.apm/foo

the session's session.server.landinguri variable would be set to "/foo". Then you'd use that to complete the policy however you wanted.

0