Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Send cookie to client after authenticated by APM

Squeak
Cirrus
Cirrus

Hi,

 

I´ve a scenario that requires that the APM sends a cookie back to the client after the user has been authenticated by the APM but before the user "hits" the backend server.

 

Normally I would have use the "when HTTP_RESPONSE" to insert the cookie to the client but  that requires the traffic has been sent by the backend server.     

 

//Cheers Mikael

 

3 REPLIES 3

kgaigl
Cirrocumulus
Cirrocumulus

we've an IRule like this:

when ACCESS_ACL_ALLOWED {
   set user [ACCESS::session data get "session.logon.last.username"]
}
when HTTP_REQUEST_RELEASE {
               HTTP::header insert "X-Forwarded-User" $user
}
when HTTP_RESPONSE_RELEASE {
    log local0. "[HTTP::status] [HTTP::header "Location"]"
}

so maybe you can change this to your needs, for example instead of "header insert" "cookie insert"

Hi kgaigl and thank you for your reply.

I want the APM to send back a cookie after the client are authenticated but before the client reaches the backend server, so I can´t use

when HTTP_RESPONSE_RELEASE

or

when HTTP_RESPONSE

Any more ideas?

//Mikael

kgaigl
Cirrocumulus
Cirrocumulus
when ACCESS_ACL_ALLOWED

is when the Client is authenticated