Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2518)

Issue 7253043: Serve HTTPS and WebSocket on the same port.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by frankban
Modified:
11 years, 3 months ago
Reviewers:
mp+145940
Visibility:
Public.

Description

Serve HTTPS and WebSocket on the same port. The WebSocket connection must be established on port 443, so that using Firefox securely no longer requires the user to accept a self-signed certificate twice: once for the HTTPS port and once for the wss port. HAProxy is used to do that: juju-gui/ppa contains the development release of HAProxy, supporting SSL. HTTPS traffic is sent to nginx (port 8000), and wss connections are redirected to the underlaying API backend (port 8080). The juju-api-port option has been removed: since that port is no longer exposed, the one being used can be considered just an internal implementation. Other changes: Updated documentation. Moved static upstart configuration files set up to the install hook. This way, a config change no longer causes them to be rewritten as they are over and over. Some renaming and clean up. QA: - deploy the charm - open the application using Firefox - add the security exception - you should see the Juju GUI login screen - now try staging: juju set juju-gui staging=true - compulsively refresh Firefox - admire the services https://code.launchpad.net/~frankban/charms/precise/juju-gui/bug-1104098-same-port/+merge/145940 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9

Patch Set 2 : Serve HTTPS and WebSocket on the same port. #

Total comments: 8

Patch Set 3 : Serve HTTPS and WebSocket on the same port. #

Patch Set 4 : Serve HTTPS and WebSocket on the same port. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -122 lines) Patch
M README.md View 1 2 3 chunks +3 lines, -7 lines 0 comments Download
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M config.yaml View 1 chunk +0 lines, -5 lines 0 comments Download
M config/config.js.template View 1 chunk +1 line, -1 line 0 comments Download
A config/haproxy.conf View 1 chunk +22 lines, -0 lines 0 comments Download
A config/haproxy.cfg.template View 1 1 chunk +40 lines, -0 lines 0 comments Download
M config/nginx.conf View 1 chunk +1 line, -1 line 0 comments Download
M config/nginx-site.template View 1 chunk +1 line, -9 lines 0 comments Download
M hooks/config-changed View 5 chunks +12 lines, -14 lines 0 comments Download
M hooks/install View 3 chunks +17 lines, -3 lines 0 comments Download
M hooks/start View 1 chunk +8 lines, -14 lines 0 comments Download
M hooks/utils.py View 13 chunks +50 lines, -21 lines 0 comments Download
M revision View 1 chunk +1 line, -1 line 0 comments Download
M tests/deploy.test View 3 chunks +10 lines, -19 lines 0 comments Download
M tests/test_utils.py View 6 chunks +42 lines, -27 lines 0 comments Download

Messages

Total messages: 7
frankban
Please take a look.
11 years, 3 months ago (2013-01-31 18:16:04 UTC) #1
gary.poster
Wow, very nice Francesco. Land as is. I have some chatty comments, in which I ...
11 years, 3 months ago (2013-02-01 02:07:44 UTC) #2
frankban
Please take a look. https://codereview.appspot.com/7253043/diff/1/README.md File README.md (right): https://codereview.appspot.com/7253043/diff/1/README.md#newcode9 README.md:9: upcoming continuous integration work. Internet ...
11 years, 3 months ago (2013-02-01 09:43:38 UTC) #3
teknico
Land as is. Very nice branch, thanks. See a few comments below. https://codereview.appspot.com/7253043/diff/9001/README.md File README.md ...
11 years, 3 months ago (2013-02-01 12:06:33 UTC) #4
frankban
Please take a look. https://codereview.appspot.com/7253043/diff/9001/README.md File README.md (left): https://codereview.appspot.com/7253043/diff/9001/README.md#oldcode65 README.md:65: On 2013/02/01 12:06:33, teknico wrote: ...
11 years, 3 months ago (2013-02-01 12:28:57 UTC) #5
frankban
Thanks for the reviews Gary and Nicola!
11 years, 3 months ago (2013-02-01 12:30:19 UTC) #6
frankban
11 years, 3 months ago (2013-02-01 13:50:31 UTC) #7
*** Submitted:

Serve HTTPS and WebSocket on the same port.

The WebSocket connection must be established on
port 443, so that using Firefox securely no longer
requires the user to accept a self-signed certificate 
twice: once for the HTTPS port and once for the wss port.

HAProxy is used to do that: juju-gui/ppa contains the
development release of HAProxy, supporting SSL.
HTTPS traffic is sent to nginx (port 8000), and wss
connections are redirected to the underlaying API
backend (port 8080). The juju-api-port option has been
removed: since that port is no longer exposed, the one
being used can be considered just an internal 
implementation.

Other changes:

Updated documentation.

Moved static upstart configuration files set up to the 
install hook. This way, a config change no longer causes 
them to be rewritten as they are over and over.

Some renaming and clean up.

QA:

- deploy the charm
- open the application using Firefox
- add the security exception
- you should see the Juju GUI login screen
- now try staging: juju set juju-gui staging=true
- compulsively refresh Firefox
- admire the services

R=gary.poster, teknico
CC=
https://codereview.appspot.com/7253043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b