cancel
Showing results for 
Search instead for 
Did you mean: 

How to use literals starting with "$" in iRule

Genna_Reingold
Nimbostratus
Nimbostratus

Hi,

I need to pass client certificate to WebSphere so the application can perform SSL based authentication. I following this article https://support.f5.com/csp/article/K95338243

However in WebSphere App Server the headed for client certificate is $WSCC. But if I code iRule like this

when HTTP_REQUEST {

  HTTP::header insert $WSCC [b64encode [SSL::cert 0]]

}

 

$WSCC is treated as a variable WCSS and the rule is broken

 

How do I get around this issue?

 

Thanks

Genna

 

2 REPLIES 2

Hi Genna,

 

you can escape the '$' character with a '\'. This should work:

when HTTP_REQUEST { HTTP::header insert "\$WSSC" [b64encode [SSL::cert 0]] }

KR

Daniel

Stan_PIRON_F5
F5 Employee
F5 Employee

to prevent variable substitution, you can replace double quotes by curly braces.

 

when HTTP_REQUEST { HTTP::header insert {$WSSC} [b64encode [SSL::cert 0]] }

Stan