Support/Live Chat/Web Client/Kitsune integration: Difference between revisions
(Created page with '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 …') |
|||
Line 17: | Line 17: | ||
===Java implementation proposal=== | ===Java implementation proposal=== | ||
Fork app.jsp to create | Fork app.jsp to create '''api.jsp''' which will accept the following JSON-encoded variables from Kitsune | ||
* username: the pre-authenticated UTF8 SUMO username | * username: the pre-authenticated UTF8 SUMO username | ||
* template: always "agent" | * template: always "agent" | ||
Line 27: | Line 27: | ||
*sessionID: session identifier | *sessionID: session identifier | ||
*key: session key | *key: session key | ||
===Kitsune implementation proposal=== | ===Kitsune implementation proposal=== | ||
* When a user launches live chat, get a sessionID and key using a HTTPS request to chat-support.mozilla.com | * When a user launches live chat, get a sessionID and key using a HTTPS request to chat-support.mozilla.com | ||
* Execute the javascript function: app.init(sessionID, key) | * Execute the javascript function: app.init(sessionID, key) |
Revision as of 16:18, 4 May 2010
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.
Since we have multiple webheads and a single Live Chat server, the simplest network configuration is to use ZXTM to route https://support.mozilla.com/chatapp/ to the Jetty installation at https://chat-support.mozilla.com/chatapp/ . End-to-end encryption is important as passwords are sent over the link.
The URLs that must be accessible to the browser application are:
- https://chat-support.mozilla.com/chatapp/event (All AJAX requests)
- https://chat-support.mozilla.com/chatapp/js/* (Static javascript)
- https://chat-support.mozilla.com/chatapp/themes/* (Static CSS)
- https://chat-support.mozilla.com/chatapp/resource/* (minified resources, not yet implemented)
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 org.mozilla.support.chatapp.Session (not implemnted in initial version)
- key: sha1sum of the UTF8 JSON string (from before the key is inserted) concatenated with the salt from [1]
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 chat-support.mozilla.com
- Execute the javascript function: app.init(sessionID, key)