Altair® Panopticon

 

[4] Additional or Optional Steps

Replacing Parameter Values with HTTP Headers and Cookies

Panopticon Real Time can be configured to replace both the incoming and outgoing parameters with HTTP headers and cookies:

q  Incoming Parameters are parameters sent to Panopticon Real Time when requesting data. These types of parameters are also referred to as request parameters.

q  Outgoing Parameters are parameters which are returned to the Client when retrieving a workbook. These types of parameters are also referred to as response parameters.

This feature is used for employing the user identifier as a parameter and sending the user identifier as a Header and Cookie. The Server Administrator can configure these properties so that the incoming parameters employ the user identifier value when requesting data. Consequently, the requested HTTP Header and Cookie values will be tailored for each user. The Server Administrator can also update these properties so that the outgoing parameters get updated when loading a workbook. For example, if you want the user’s identifier to be shown in the workbook as a Title.

Replacing the parameter values with Header and Cookie values is achieved by configuring certain properties in the Panopticon.properties file  located in the Appdata  folder or c:\vizserverdata).

Updating incoming parameters can be achieved by configuring the following properties:

 

 

Property

Request parameter mapping

Attribute

request.cookie.parameters.mapping.required

Description

The parameters that are required to be updated with certain cookie values. This property will only affect incoming parameters. The operation will fail if configured cookie values are not present in the request. The property should be formatted as follows: Parameter name (Value delimiter) Cookie name.

Default Value

 

Property

Request parameter mapping

Attribute

request.cookie.parameters.mapping.optional

Description

The parameters that could be updated with certain cookie values. This property will only affect incoming parameters. The operation will not fail if the cookie values are not present in the request. The parameters will keep their default value instead of the configured cookie value if the cookie is not present. The property should be formatted as follows: Parameter name (Value delimiter) Cookie name.

Default Value

 

Property

Request parameter mapping

Attribute

request.cookie.parameters.mapping.entry.delimiter

Description

The delimiter that separates the configuration entries. This property will only affect incoming parameters.

Default Value

, (Comma)

Property

Request parameter mapping

Attribute

request.cookie.parameters.mapping.value.delimiter

Description

The delimiter that separates the parameter name and the cookie name. This property will only affect incoming parameters.

Default Value

: (Colon)

Property

Request parameter mapping

Attribute

request.header.parameters.mapping.required

Description

The parameters that are required to be updated with certain header values. This property will only affect incoming parameters. The operation will fail if a configured header values are not present in the request. The property should be formatted as follows: Parameter name (Value delimiter) Header name.

Default Value

 

Property

Request parameter mapping

Attribute

request.header.parameters.mapping.optional

Description

The parameters that could be updated with certain header values. This property will only affect incoming parameters. The operation will not fail if the header values are not present in the request. The parameters will keep their default value instead of the configured header value if the header is not present. The property should be formatted as follows: Parameter name (Value delimiter) Header name.

Default Value

 

Property

Request parameter mapping

Attribute

request.header.parameters.mapping.entry.delimiter

Description

The delimiter that separates the configuration entries. This property will only affect incoming parameters.

Default Value

, (Comma)

Property

Request parameter mapping

Attribute

request.header.parameters.mapping.value.delimiter

Description

The delimiter that separates the parameter name and the header name. This property will only affect incoming parameters.

Default Value

: (Colon)

 


 

The following properties can be configured to update outgoing parameters:

 

 

Property

Response parameter mapping

Attribute

response.operation.parameters.mapping.required

Description

The parameters that are required to be updated with certain Header values. This property will only affect outgoing parameters. The operation will fail if configured Header values are not present in the request. The property should be formatted as follows: Parameter name (Value delimiter) Header name.

Default Value

 

Property

Response parameter mapping

Attribute

response.operation.parameters.mapping.optional

Description

The parameters that could be updated with certain Header values. This property will only affect outgoing parameters. The operation will not fail if the Header values are not present in the request. The parameters will keep their default value instead of the configured Header value if the Header is not present. The property should be formatted as follows: Parameter name (Value delimiter) Header name.

Default Value

 

Property

Response parameter mapping

Attribute

response.operation.parameters.mapping.entry.delimiter

Description

The delimiter that separates the configuration entries. This property will only affect incoming parameters.

Default Value

, (Comma)

Property

Response parameter mapping

Attribute

response.operation.parameters.mapping.value.delimiter

Description

The delimiter that separates the parameter name and the Header name. This property will only affect incoming parameters.

Default Value

: (Colon)

 

Example

This section describes how incoming parameters are replaced with Header values. For example, Panopticon Real Time is required to update parameters uid and uname.

Parameter Name

Update With Header

uid

userIDHeader

uname

userNameHeader

 

The request will fail if the required Headers are not present in the incoming request.

For the next example, Panopticon Real Time will try to update the parameter ulocation with userLocationHeader header. The parameter value will only be updated if the Header is available.

In both of these configurations, comma was used as an entry delimiter and colon as a delimiter between the parameter name and the Header name.

However, for outgoing parameters, the property prefix (request) has to be changed to response instead.

Configurations:

request.header.parameters.mapping.required=uid:userIdHeader,uname:userNameHeader

request.header.parameters.mapping.optional=ulocation:userLocationHeader

request.header.parameters.mapping.entry.delimiter=,

request.header.parameters.mapping.value.delimiter=:

 

 NOTE

Mapping the same parameter in both the header and cookie will thrown an exception on initialize.