For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

beefy80's avatar
beefy80
Icon for Nimbostratus rankNimbostratus
May 08, 2015

ASM Support ID in HTTP Header

I have been trying to get an iRule to add into a HTTP header the support ID however for some reason in 11.6.0 HF4 I cannot get this to work. Reading other threads I would expect the following to work. The irule is as follows:

when HTTP_REQUEST_RELEASE {
    HTTP::header insert X-ASM-SUPPORT-ID [ASM::support_id]
}

When I try and save the iRule it errors with: 01070151:3: Rule [/dmz/irule_asm_supportid] error: /dmz/irule_asm_supportid:2: error: [command is not valid in current event context (HTTP_REQUEST_RELEASE)][ASM::support_id]

Has anyone got any ideas?

James

2 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    James,

     

    HTTP_REQUEST_RELEASE is not a valid Event for the command. See ASM__support_id

     

    Valid events are ASM_REQUEST_DONE,ASM_REQUEST_VIOLATION,ASM_RESPONSE_VIOLATION

     

    Hope this helps,

     

    N

     

  • I have been working on this again recently as I had previously stopped working on it and found that the way I could get this working was to use the following iRule.

    when HTTP_REQUEST_RELEASE {
         check if we have collected the support id ok and if so add the HTTP header
        if {[info exists x_asm_support_id]} {
            HTTP::header insert X-ASM-SUPPORT-ID $x_asm_support_id
        }
    }
    
    when ASM_REQUEST_DONE {
         Collect the Support ID and store it so we can add it to a HTTP header
        set x_asm_support_id [ASM::support_id]
    }