Forum Discussion

MHMHMH's avatar
MHMHMH
Icon for Nimbostratus rankNimbostratus
Feb 11, 2016

add username to URI after APM Logon

Hi everyone,

we are trying to change the URI and add an username as value to the query after APM Logon was succesful.

User connects to the APM Portal -> https://abc.com -> Login was sucessful -> https://abc.com/path/data?key=USERNAME

However, our iRule is not working. I think we have a mistake in our thinking..

when HTTP_REQUEST {

set user [ACCESS::session data get "session.logon.last.username"]

if {  ([HTTP::path] equals "/") }{  
        HTTP::uri "/path/data?key=$user"

}
log local0. "User ist $user"
log local0. "[HTTP::uri]"
}

Thanks alot in advance!

Michael

2 Replies

  • Are you talking about updating the URI as soon as the access policy completes and the user finishes login? If so, then it's important to note the event flow for APM. In that case

    HTTP_REQUEST
    happens before all the APM related stuff.

    Are you setting a redirect page at the end of your policy? You could add the username there.

    What does the log show as the URI after you try to change it?