Convert an HTTP Header Response Attribute to Upper Case
search cancel

Convert an HTTP Header Response Attribute to Upper Case


Article ID: 5055


Updated On:


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


A WebAgent-HTTP-Header-Variable is configured to return a user attribute from an LDAP user store.  There is an application which is looking for the value in the HTTP Header.  The application requires that the HTTP Header value be 'All Caps'.  The HTTP Header value is being populated with either a lower case or mixed case value.


User Attribute: sSOHeader

Attribute Value: user2

Resulting HTTP Header: HTTP_SSOHEADER:user2



Policy Server: AnyPolicy Store: AnyUser Store: LDAPWeb Agent: AnyWeb Server: Any


The HTTP Header will be populated with the value from the User Attribute the same way it is stored in the user store.  This is default behavior.  If the value is lower case or a mixed-case, that is what will be populated in the HTTP Header.




We need to run UCASE against the value to convert it to upper case. However, that can only be done in a Virtual Attribute. This means we need to create a Named Expression. The Named Expression is configured as a Virtual Attribute. It calls the attribute from the user directory, then runs UCASE against it. The Response calls the named Expression. 


1) Configure a Named Expression 

a) Select the 'Virtual Attribute' radio button.

-> Expression Name will be prefixed with "#" 

b) Name the Named Expression

-> example: #SSOHeaderNamedExpression 

c) Configure the following Expression: 

 UCASE(<Attribute Name>) 

 example: UCASE(sSOHeader) 


2) Configure a Response 

a) Response Attribute: WebAgent-HTTP-Header-Variable 

b) Attribute Kind: Expression 

c) Configure a Variable Name

example: SSOHEADER

c) Configure the name of the Named Expression in the Expression field. 

Expression: #SSOHeaderNamedExpression

Script (Resulting): SSOHEADER=<$expr="#SSOHeaderNamedExpression" $> 

In this example the user attribute is named "sSOHeader", and the value is in lower case. The Named Expression "#SSOHeaderNamedExpression" is calling the user attribute "sSOHeader" and running UCASE against the result. The Response is an expression calling the named expression. The result is the header attribute gets printed in upper case. 



User Attribute: sSOHeader

Attribute Value: user2