Forum Discussion

Max_385169's avatar
Max_385169
Icon for Nimbostratus rankNimbostratus
Mar 18, 2019

Would like to assign a session var and add to an https header

I'm completely new to F5/Big IP and have been assigned to work with our Network team to integrate an application SSO solution with the existing iRule. The network team only do basic re-directs and are intimidated at going beyond the working iRules. From my research this does not appear to be too difficult. What we need to do is assign a session variable to a local var and insert it into the header. I'm thinking it should look something like this:

 

when HTTP_REQUEST { set inbound_uri [string tolower [HTTP::uri]] set mycustom_var[ACCESS::session data get "session.logon.last.username"] HTTP::header insert $mycustom_var if { $inbound_uri starts_with "Blah" } {HTTP::redirect }

 

}

 

Any assistance will be much appreciated,

 

2 Replies

  • The session variable I am trying to add is the MS AD logon User_ID - server variables that contain this data are LOGON_USER and AUTH_USER. From my reading it looks like this data is stored in "session.logon.last.username". The application is looking for this value in the custom var in the header. Hope this is helpful.