Forum Discussion

kimhenriksen's avatar
kimhenriksen
Icon for Cirrostratus rankCirrostratus
Mar 28, 2024

apm session variable from part of uri...

Hey all,

 

I have a problem I need to solve. We have an application that uses a mobile app, the app does authentication with apm(local sp/external idp) through one browser and then accesses the the backend server in another session.. and the apm is not aware of that second one so it gerenrates a new login which fails and the app cannot login. 

 

The app passes a identification value the the urls which the app uses.. I want to do the same.

Does anyone know or have any tips on how i can catch part of the uri (sort of like this https://test.com/sessionid=1234-5678-9101) that contains the sessionid and apply it to a session variable?

 

/Kim

  • Hi Kim,

    It sounds like you might want to use the 'Multiple Domains' domain mode in 'SSO / Auth Domains' that can be found in the Access Profile. This way the SP and the backend server will share the same Access Policy. Once authenticated by SAML (APM) the valid session cookie will also be sent when accessing the backend server.

    Otherwise you'll end up with something more complicated compared to what can be found here: APM Full Step Up Authentication | DevCentral (f5.com). This solution uses cookies to retrieve session variables from another session.

     

  • The scenario is not clear, can you expand a little bit? what is https://test.com/sessionid=1234-5678-910 used for? when? If it is the login uri for the APM session, you can use the string function within a variable assign agent to extract the sessionid and assign it to a session variable 

    • kimhenriksen's avatar
      kimhenriksen
      Icon for Cirrostratus rankCirrostratus

      The sessionid is used by the application to identify the session.. as is jumps browsers they use that backend to allow it through. But the APM doesnt know that, so i generates a new login prompt on the second connection. So I would like to extract the sessionid from the response, save it as a variable and then look for it in the next connection.