Merge lp:~gnuoy/charms/precise/apache2/apache2-openid into lp:charms/apache2

Proposed by Liam Young on 2014-01-30
Status: Merged
Merged at revision: 52
Proposed branch: lp:~gnuoy/charms/precise/apache2/apache2-openid
Merge into: lp:charms/apache2
Diff against target: 47 lines (+19/-0)
3 files modified
README.md (+7/-0)
config.yaml (+4/-0)
hooks/hooks.py (+8/-0)
To merge this branch: bzr merge lp:~gnuoy/charms/precise/apache2/apache2-openid
Reviewer Review Type Date Requested Status
Marco Ceppi 2014-01-30 Approve on 2014-02-04
Review via email: mp+203895@code.launchpad.net
To post a comment you must log in.
Marco Ceppi (marcoceppi) wrote :

This LGTM, thanks! +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.md'
2--- README.md 2013-04-26 21:01:01 +0000
3+++ README.md 2014-01-30 09:14:06 +0000
4@@ -210,6 +210,13 @@
5 Space separated list of modules to be enabled or disabled. If a module to
6 be enabled cannot be found then the charm will attempt to install it.
7
8+## OpenId
9+
10+The openid_provider option takes a comma seperated list of OpenID
11+providers and places them in /etc/apache2/security/allowed-ops.txt. That
12+file can then be refernced by the allowed-op-list-url option when using
13+apache_openid
14+
15 ## TODO:
16
17 * Document the use of balancer, nrpe, logging and website-cache
18
19=== modified file 'config.yaml'
20--- config.yaml 2013-10-01 12:50:28 +0000
21+++ config.yaml 2014-01-30 09:14:06 +0000
22@@ -167,3 +167,7 @@
23 type: string
24 description: List of extra packages to be installed (e.g. commercial GeoIP package)
25 default: ""
26+ openid_provider:
27+ type: string
28+ description: Comma seperated list of OpenID providers for authentication.
29+ default: ""
30
31=== modified file 'hooks/hooks.py'
32--- hooks/hooks.py 2014-01-16 12:33:28 +0000
33+++ hooks/hooks.py 2014-01-30 09:14:06 +0000
34@@ -549,6 +549,14 @@
35 if config_data["config_change_command"] in ["reload", "restart"]:
36 service_apache2(config_data["config_change_command"])
37
38+ if config_data['openid_provider']:
39+ if not os.path.exists('/etc/apache2/security'):
40+ os.mkdir('/etc/apache2/security', 0755)
41+ with open('/etc/apache2/security/allowed-ops.txt', 'w') as f:
42+ f.write(config_data['openid_provider'].replace(',','\n'))
43+ f.write('\n')
44+ os.chmod(key_file, 0444)
45+
46 update_nrpe_checks()
47 ship_logrotate_conf()
48

Subscribers

People subscribed via source and target branches

to all changes: