Support/Live Chat/Web Client/Kitsune integration

From MozillaWiki
Jump to: navigation, search

Proposal for integrating Live Chat with Kitsune

Step 1: routing traffic (needs IT approval)

Ajax requests to a backend server is used for all communication to and from Live Chat. To satisfy the same-origin policy when embedding chat into Kitsune pages, a proxy needs to be set up to route requests to the backend server.

Use Zeus to redirect data (Option 1)

Since we have multiple webheads and a single Live Chat server, the simplest network configuration is to use ZXTM to route to the Jetty installation at . End-to-end encryption is important as passwords are sent over the link.

The URLs that must be accessible to the browser application are:

Use a Python proxy (Option 2)

We could avoid additional server configuration by configuring Django's built-in proxy to route the Live Chat requests

Step 2: authentication (existing system for CSAT)

Kitsune will need to verify authentication and create sessions in the Java application, using a to-be-developed API

Java implementation proposal

Fork app.jsp to create api.jsp which will accept the following JSON-encoded variables from Kitsune

  • username: the pre-authenticated UTF8 SUMO username
  • template: always "agent"
  • locale: locale name
  • metadata: named parameters to be pre-inserted into the (not implemnted in initial version)
  • key: sha1sum of the UTF8 JSON string (from before the key is inserted) concatenated with the salt from [2]

api.jsp will then return a JSON object consiting of:

  • sessionID: session identifier
  • key: session key

Kitsune implementation proposal

  • When a user launches live chat, get a sessionID and key using a HTTPS request to
  • Execute the javascript function: app.init(sessionID, key)