08-Sep-2021 19:56
I want to append RelayState parameter after the http payload and send the request to server.
Need help with iRule to achieve this.
https://10.x.x.x/adfs/ls/SAMLResponse=<XYZ>
I want to add this parameter "&RelayState=RPID%3Dnehrliferaydevsp" after the payload
https://10.x.x.x/adfs/ls/SAMLResponse=<XYZ>&RelayState=RPID%3Dliferaydevsp
08-Sep-2021 23:33
you should use HTTP::uri to set new uri, here are the link:
https://clouddocs.f5.com/api/irules/HTTP__uri.html
iRules code:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/adfs/ls/SAMLResponse=<XYZ>" } {
set uri [HTTP::uri]
HTTP::uri [append uri "&RelayState=RPID%3Dliferaydevsp"]
}
}
09-Sep-2021 00:21
I`m able to see its appending "&RelayState=RPID%3Dliferaydevsp" before "&SAMLResponse=ENCRYPTEDBODY"
But is it possible to append after the SAML body?
Like below,
"&SAMLResponse=ENCRYPTEDBODY&RelayState=RPID%3Dlifedevsp"
This is what we have currently->
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/adfs/ls/" } {
set uri [HTTP::uri]
HTTP::uri [append uri "&RelayState=RPID%3Dlifedevsp"]
}
}