Question & Answer
Question
What is the new entity tag generation algorithm that is available with IBM WebSphere Presence Server 7.0.0.1 Interim Fix 3?
Answer
The entity-tag token (SIP-E-Tag header returned in a 200 OK response to a SIP PUBLISH message) must be generated by the Presence Server using configured data.
To provide uniqueness and some level of authorization, the configured data should include
· A specific header field; chosen header field is the To: header field.
· PIDF document element attribute(s); chosen values are entity-id of the <presence> element and id of the <tuple> element.
both part of an incoming SIP PUBLISH message. Those values will be used for the generation of the entity-tag token returned in the associated response. It should also be possible to append constant string value(s) for the entity-tag token generation.
As such, the algorithm will use the header field, the tuple id, and the constant string to generate the entity-tag token for event-type presence. It will use the header field and the constant string to generate the entity-tag token for the event-type message summary.
For example,
- assume the header field specified for use in the entity-tag generation is the "To:" SIP header;
- assume the tuple id in the incoming message body is "company_vm"; and
- assume the configured constant string is "PresenceAdapter";
- then, per the simple algorithm, the entity token for event-type presence will be tel:+
18563021008@ims.company.net~PresenceAdapter~company_vm; based on the "To:" header field value of tel:+18563021008@ims.company.net in the incoming message; and - the entity token for event-type message-summary will be
tel:+18563021008@ims.company.net~PresenceAdapter
It must be possible to apply the algorithm to specific services that interact with the Presence Server as well as replace the out-of-the-box algorithm with a custom one at point of deployment. Therefore the algorithm or the API that is used for the generation of the entity-tag token must be published.
For implementation purposes, the following properties have been added to the SystemConfiguration.xml
<!-- Configure entity tag generator -->
<customEtagGenerator enable="true" class="">
<!-- list of event package with parameters for entity tag generation used by the default publication service -->
<event name="presence" constant="pa" separator="~"/>
<event name="message-summary" constant="company_vm_pa" separator="~"/>
</customEtagGenerator>
The property customEtagGenerator enable="true"enables the new eTag algorithm. If this attribute is false, the Presence Server generates etags as before.
In the default implementation, the E-Tag is partially configurable based on the values in the configuration file. "To:" header and the "tuple id" are mandatory for the tag generation.
In addition, a SPI is exposed as part of WebSpeherePresenceServerAPI.jar to allow users to develop their own algorithm for etag generation if needed. In this case the new module / jar along with the WebSpeherePresenceServerAPI.jar should be added to the server classpath and the system configuration should include the class name of the third party generator.
For example:
<customEtagGenerator enable="true" class="com.abc.ThirdPartyGenerator">
...
</customEtagGenerator>
If a class is present in the SystemConfiguration.xml, the Presence Server will invoke this class for etag generation.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21502732