Merge lp:~hatch/charms/trusty/juju-gui/firefox-cert-fix into lp:~juju-gui/charms/trusty/juju-gui/trunk

Proposed by Jeff Pihach
Status: Merged
Approved by: Jeff Pihach
Approved revision: 256
Merged at revision: 256
Proposed branch: lp:~hatch/charms/trusty/juju-gui/firefox-cert-fix
Merge into: lp:~juju-gui/charms/trusty/juju-gui/trunk
Diff against target: 25 lines (+3/-1)
1 file modified
hooks/utils.py (+3/-1)
To merge this branch: bzr merge lp:~hatch/charms/trusty/juju-gui/firefox-cert-fix
Reviewer Review Type Date Requested Status
Richard Harding Approve
Review via email: mp+258561@code.launchpad.net

Description of the change

Fixes https://bugs.launchpad.net/juju-gui/+bug/1397296 by adding a unique integer to the certificate name.

To QA deploy the charm and visit in firefox. When visiting for the first time ensure that the generated certificate name follows the format your-jujugui-########.local

To post a comment you must log in.
Revision history for this message
Richard Harding (rharding) wrote :

LGTM with QA of loading it and deploying it to ec2.

From the SSL details:
The certificate is only valid for your-jujugui-1431034422.local

It then loaded properly and functioned.

Small fix here so feel free to land.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/utils.py'
--- hooks/utils.py 2015-03-05 17:21:32 +0000
+++ hooks/utils.py 2015-05-07 21:14:00 +0000
@@ -26,6 +26,7 @@
26import shutil26import shutil
27from subprocess import CalledProcessError27from subprocess import CalledProcessError
28import tempfile28import tempfile
29import time
29import urlparse30import urlparse
30import yaml31import yaml
3132
@@ -680,11 +681,12 @@
680 else:681 else:
681 # Generate certificates.682 # Generate certificates.
682 # See http://superuser.com/questions/226192/openssl-without-prompt683 # See http://superuser.com/questions/226192/openssl-without-prompt
684 cn = 'your-jujugui-{0}.local'.format(int(time.time()))
683 cmd_log(run(685 cmd_log(run(
684 'openssl', 'req', '-new', '-newkey', 'rsa:4096',686 'openssl', 'req', '-new', '-newkey', 'rsa:4096',
685 '-days', '365', '-nodes', '-x509', '-subj',687 '-days', '365', '-nodes', '-x509', '-subj',
686 # These are arbitrary test values for the certificate.688 # These are arbitrary test values for the certificate.
687 '/C=GB/ST=Juju/L=GUI/O=Ubuntu/CN=your-jujugui.local',689 '/C=GB/ST=Juju/L=GUI/O=Ubuntu/CN={0}'.format(cn),
688 '-keyout', key_path, '-out', crt_path))690 '-keyout', key_path, '-out', crt_path))
689 # Generate the pem file.691 # Generate the pem file.
690 pem_path = os.path.join(ssl_cert_path, JUJU_PEM)692 pem_path = os.path.join(ssl_cert_path, JUJU_PEM)

Subscribers

People subscribed via source and target branches

to all changes: