search cancel

Expression calculated header in a URL in a "WebAgent-OnAccept-Redirect"

book

Article ID: 41839

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

Introduction: 

This KB article illustrates how to pass an expression calculated header in a URL in a "WebAgent-OnAccept-Redirect"

Question: 

Is it Possible to Create expressions which retrieves an http header and insert value into URL ? for example 

/home.do?UserId={insert header value here}&email={insert header value here}

 

Environment:  

This applies to Single Sign on version 12.x and later 

Answer: 

Yes ,the above can be achieved by following the below steps :

 

1) create A response with "WebAgent-OnAccept-Redirect"

2) Chose the Expression Option within the "Attribute Kind"

3) create your Expression for Example "expr="LENGTH(mail) = 0 ? CarLicense : mail"$>" . This Expression will check if mail attribute is empty and if yes,it will return CarLicense ,else it will return mail. 

4) Once Entered ,Edit the script in the Advanced section and add the URL to it as shown below 

http://testserver.ca.com/iisstart.htm?test_header=<$expr="LENGTH(mail) = 0 ? CarLicense : mail"$>

5) Link the Response to the rule.

4) Upon successful Authentication ,Policy server will issue a 302 redirect to the URL above with the Expression calculated 

http://testserver.ca.com/iisstart.htm?test_header=70W  with 70W being the value of mail attribute in the test scenario.

 

Additional Information:

N/A

 

Environment

Release: ESPSTM99000-12.51-Single Sign On-Extended Support Plus
Component: