Forum Discussion
iRule to capture APM External Logon Page Variables
Hi there,
I've got an APM enabled VS that redirects users to an external logon page to collect logon details as well as a couple of other variables. When the user submits credentials it posts them back to the APM enabled VS "/my.policy". This works fine for the username and password, but there are a couple of other variables that are posted back as well that I can't seem to capture.
I tried to use the following irule, but that does not collect any information.
when HTTP_REQUEST {
check for post request
set url 0
if {[HTTP::uri] starts_with "/my.policy" and [HTTP::method] eq "POST"}{
set url 1
set my_content_length [HTTP::header "Content-Length"]
HTTP::collect $my_content_length
}}
when HTTP_REQUEST_DATA {
Set the collected POST variables into keys in the LTM session table
if { $url ==1} {
table set key_variable_01 [findstr [HTTP::payload] variable01 11 "&"] 0 indefinite
log local0. "[findstr [HTTP::payload] variable01 11 "&"]"
HTTP::release
set url 0
}}
I tried changing the event to "when ACCESS_SESSION_STARTED" but http::collect does not appear to be valid in that event.
Any suggestions?
- MiLK_MaNNimbostratusCertain iRule events including HTTP_REQUEST are not exposed for internal APM URI's. Please read about ACCESS::restrict_irule_events for some further info.
I'm just wondering if we'd automatically create additional session attributes in "session.logon.last.{insert query parameter here}" anyway. Have you looked at the session attributes for the user to see if this is happening already?
- Mark_van_DCirrostratusHi Milk_Man,
- mdsilva_266229Nimbostratus
So I have a similar problem.
My login page has username, password and loginmode.
username and password get through fine, but I have no idea on what i need to do in my iRules or somewhere else on how to get loginmode into my session so i can use it in the workflow.
Any ideas?
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