Support/Live Chat/Web Client/Kitsune integration: Difference between revisions
Line 3: | Line 3: | ||
==Step 1: routing traffic (needs IT approval)== | ==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. | 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 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. | 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. | ||
Line 11: | Line 13: | ||
* https://chat-support.mozilla.com/chatapp/themes/* (Static CSS) | * https://chat-support.mozilla.com/chatapp/themes/* (Static CSS) | ||
* https://chat-support.mozilla.com/chatapp/resource/* (minified resources, not yet implemented) | * https://chat-support.mozilla.com/chatapp/resource/* (minified resources, not yet implemented) | ||
===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 | |||
* Docs: [http://pypi.python.org/pypi/django-http-proxy/] | |||
==Step 2: authentication (existing system for CSAT)== | ==Step 2: authentication (existing system for CSAT)== |
Latest revision as of 16:22, 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.
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 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)
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
- Docs: [1]
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 [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 chat-support.mozilla.com
- Execute the javascript function: app.init(sessionID, key)