From 93228988ede3bec64a9f5c52fcbdff9ca5bb4e37 Mon Sep 17 00:00:00 2001 From: sbartel Date: Thu, 7 May 2015 17:02:45 +0200 Subject: [PATCH] Initial implementation of TLS plugin for Fuel Change-Id: I45db29ce60925e90629c7fa92333b026a4656430 --- .gitignore | 3 + LICENSE | 202 ++++++++++++++++++ README.md | 167 +++++++++++++++ deployment_scripts/puppet/manifests/site.pp | 30 +++ .../puppet/manifests/site_compute.pp | 19 ++ .../puppet/modules/tls/files/format.sh | 26 +++ .../puppet/modules/tls/manifests/compute.pp | 12 ++ .../modules/tls/manifests/controller.pp | 52 +++++ .../modules/tls/manifests/controller_ha.pp | 29 +++ .../modules/tls/manifests/horizon/horizon.pp | 85 ++++++++ .../tls/manifests/horizon/horizon_ha.pp | 74 +++++++ .../tls/manifests/nova/novnc_compute.pp | 17 ++ .../tls/manifests/nova/novnc_controller.pp | 24 +++ .../puppet/modules/tls/manifests/params.pp | 31 +++ .../modules/tls/spec/classes/init_spec.rb | 7 + .../puppet/modules/tls/spec/spec_helper.rb | 1 + .../templates/openstack-dashboard.conf.erb | 58 +++++ .../modules/tls/templates/port.conf.erb | 21 ++ .../puppet/modules/tls/templates/vhost.erb | 37 ++++ .../puppet/modules/tls/tests/init.pp | 13 ++ environment_config.yaml | 13 ++ figures/tls-plugin.png | Bin 0 -> 7933 bytes metadata.yaml | 34 +++ pre_build_hook | 4 + repositories/centos/.gitkeep | 0 repositories/ubuntu/.gitkeep | 0 tasks.yaml | 15 ++ 27 files changed, 974 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 deployment_scripts/puppet/manifests/site.pp create mode 100644 deployment_scripts/puppet/manifests/site_compute.pp create mode 100644 deployment_scripts/puppet/modules/tls/files/format.sh create mode 100644 deployment_scripts/puppet/modules/tls/manifests/compute.pp create mode 100644 deployment_scripts/puppet/modules/tls/manifests/controller.pp create mode 100644 deployment_scripts/puppet/modules/tls/manifests/controller_ha.pp create mode 100644 deployment_scripts/puppet/modules/tls/manifests/horizon/horizon.pp create mode 100644 deployment_scripts/puppet/modules/tls/manifests/horizon/horizon_ha.pp create mode 100644 deployment_scripts/puppet/modules/tls/manifests/nova/novnc_compute.pp create mode 100644 deployment_scripts/puppet/modules/tls/manifests/nova/novnc_controller.pp create mode 100644 deployment_scripts/puppet/modules/tls/manifests/params.pp create mode 100644 deployment_scripts/puppet/modules/tls/spec/classes/init_spec.rb create mode 100644 deployment_scripts/puppet/modules/tls/spec/spec_helper.rb create mode 100644 deployment_scripts/puppet/modules/tls/templates/openstack-dashboard.conf.erb create mode 100644 deployment_scripts/puppet/modules/tls/templates/port.conf.erb create mode 100644 deployment_scripts/puppet/modules/tls/templates/vhost.erb create mode 100644 deployment_scripts/puppet/modules/tls/tests/init.pp create mode 100644 environment_config.yaml create mode 100644 figures/tls-plugin.png create mode 100644 metadata.yaml create mode 100644 pre_build_hook create mode 100644 repositories/centos/.gitkeep create mode 100644 repositories/ubuntu/.gitkeep create mode 100644 tasks.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..daedd39 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.tox +.build +*.pyc diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..93b25a7 --- /dev/null +++ b/README.md @@ -0,0 +1,167 @@ +TLS plugin for Fuel +=================== + +TLS plugin +--------------- + +Overview +-------- +By default the openstack environment is configured with Http protocol. This plugin allows to configure Horizon, and novnc to use Https connexion by using Transport LAyer security (TLS) protocol to improve security. + +This repo contains all necessary files to build Https Fuel plugin. + +Requirements +------------ + +| Requirement | Version/Comment | +|----------------------------------|---------------------------------------------------------| +| Mirantis Openstack compatibility | 6.0 | +|----------------------------------|---------------------------------------------------------| +| Crt & Key files | You have a crt & key files to provide before deployment | + +Recommendations +--------------- + +None. + +Limitations +----------- + +Securing apis is not yet implemented. Scope of the plugin only openstack dashboard and novnc for now + +Installation Guide +================== + +Https plugin installation +---------------------------- + +1. Clone the fuel-plugin repo from: https://github.com/stackforge/fuel-plugin-tls.git + + ``git clone`` + +2. Install the Fuel Plugin Builder: + + ``pip install fuel-plugin-builder`` + +3. Build nova-nfs Fuel plugin: + + ``fpb --build fuel-plugin-tls/`` + +4. The tls-.fp file will be created in the plugin folder (fuel-plugin-tls) + +5. Move this file to the Fuel Master node with secure copy (scp): + + ``scp tls-.fp root@::/tmp`` + ``cd /tmp`` + +6. Install the nova-nfs plugin: + + ``fuel plugins --install tls-.fp`` + +6. Plugin is ready to use and can be enabled on the Settings tab of the Fuel web UI. + +User Guide +========== + +https plugin configuration +----------------------------- + +1. Create a new environment with the Fuel UI wizard + +2. Add a node with the "Compute" role. + +3. Click on the settings tab of the Fuel web UI + +4. Scroll down the page, select the "Https plugin" checkbox + and fill-in the requiered fields + - the certificate .crt content + - the certificate .key content + + +You must pass your .crt and .key files via fuel UI (settings tab) +When you pass the content of the files in fuel ui, some "space" characters will appear, don't care about this puppet will remove it. + +CRT file must be in the following format : + +-----BEGIN CERTIFICATE----- +MIIDXTCCAkWgAwIBAgIJAJHydV1v41XIMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV +BAYTAkZSMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQwHhcNMTUwMTMwMTAyNDU3WhcNMTYwMTMwMTAyNDU3WjBF +MQswCQYDVQQGEwJGUjETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 +ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAqwHssa1A2alSVh8ZZvKffGaix7mSFMDsFjUgPShqbAZ8xGQynvrHPel9 +A8E6ml0sGzHDwk8gobpu7k1wuMhcs7Np88xu5GtR1DhZWQ8MUGWHfflyjguMjtzF +pZg4j0M14SE2INwwsRRtvC0/aeV1/q7HqfTk7+y01g/N4OKvYwndNp2lbSjBZZF4 +qbL9QD5iesOptxRryJ8tcm47i6hC4LTunz9pgVI13rtlOoqtXjf07ytMydBbzpeR +4joaPAjbPf5ywf+I/n8XFxy6QPC9qAm2H3Gpo/5bb7+9S8AOhYqvWEKNotvyX1E8 +aiDLV+LHkL45Xpx47YBty6L8qNuejwIDAQABo1AwTjAdBgNVHQ4EFgQUVQNmpJDO +w5eVB3yjU80NUZSKZlcwHwYDVR0jBBgwFoAUVQNmpJDOw5eVB3yjU80NUZSKZlcw +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAqadjZT7kMXRf5bp14nfI +20m6G/i5aHBo+0v+6lRtmk5wD/D6VsOh+R/HjjDDo68y/WEWXxQbuOYX+HZCABpf +VTA4oLvY4t3gtzt9Q21VtK/l5e3yyxo2JBnsPqc5wmWDlNO8aImF+QrvovkuyTV5 +mX6suZgby4eTllmVzBNK/+FMuPlsSPwB8SxEbu04aOIcwbn4LCCZJZEG6INVGSS8 +SRg1iER8mu2Jf45JKkMFDqUhCUp/ejM2t686O7olqKtmF53rDSBnzhtabdgTIx3F +RjCb281gwvwSgyFfUgt5TIIq1o/kci2N33zuxaifFVz6DtDxKegoZg73bUMg/OA2 +bg== +-----END CERTIFICATE----- + +KEY file must be in the following format : + +-----BEGIN P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aqsO+GGSE2F75hJ0Ll5l3vEUgRVxqe9NbqA7GCDyCCl +JrBy57fwKQKBgGw8C05F3CHrhiRv+6CAfnTFolrH1mmWHYWeODtLV/xE8UWtRBE6 +gspe5VWh90AAvCZ+jBz3MKRIpe56+gcvVNOnTxsRyg4PJZ2I9uthRlT70A95WpeQ +NdKpa86AtXVKR2q+NP6jd/ScnCHapNn/h3Qau9SpVuwSLqqes1kdGNsPAoGAG0pi +mRjvoAzELjsNx2LNZV+vDfZOvZc77GKDewxR3vvLnBHuYQk0pY3VSOQgIGcJmigp +fJRTEkKTOf4xTCXl7T4kXp7Kn2zvp4c8QOMtLiFImjD2y2pozsZdyi4oh9flvZqc +t0eTR8roDRRBBNAS2z2qEoyaorWmQ/TdRfbm4ekCgYALU22vbyuPX5AVPdD0vWv4 +zLL+l0MMMRviMu1NSa9L95vVdc/C0cGaLEZ7U4x2pd+J54q+DjjIRMn2knrbBZQf +X43ceACVpWiv5DmBtEUrB8dbwxEJFaoPGqEswwdh1FDxzfsPdapyqGI5B8zRjnpa +SR2QEYok/8lZeDgUOhXkGg== +-----END PRIVATE KEY----- + +Here is a screenshot of the fields + +![tls fields](./figures/tls-plugin.png "tls-fields") + +Deployment details +------------------ + +Configure Horizon to use tls option +Configure apache to use Https connexions, and set certificate files +Restart Apache +Configure Nova with novnc https option +Restart Nova +For HA deployment add horizon tls to haproxy configuration +and restart ha_proxy + +Known issues +------------ + +None. + +Release Notes +------------- + +**1.0.0** + +* Initial release of the plugin + + + diff --git a/deployment_scripts/puppet/manifests/site.pp b/deployment_scripts/puppet/manifests/site.pp new file mode 100644 index 0000000..c443696 --- /dev/null +++ b/deployment_scripts/puppet/manifests/site.pp @@ -0,0 +1,30 @@ +$fuel_settings = parseyaml(file('/etc/astute.yaml')) +$tls_hash = $::fuel_settings['tls'] +$horizon_crt = $tls_hash['horizon_crt'] +$horizon_key = $tls_hash['horizon_key'] +$nodes_hash = $::fuel_settings['nodes'] +if ($::fuel_settings['deployment_mode'] == 'multinode') { + $controller = filter_nodes($nodes_hash,'role','controller') + $controller_node_public = $controller[0]['public_address'] + class { 'tls::controller': + horizon_crt => $horizon_crt, + horizon_key => $horizon_key, + external_ip => $controller_node_public, + bind_address => $controller_node_public + } +} +else { + $controllers = concat(filter_nodes($nodes_hash,'role','primary-controller'), filter_nodes($nodes_hash,'role','controller')) + $public_virtual_ip = $::fuel_settings['public_vip'] + $internal_virtual_ip = $::fuel_settings['management_vip'] + class { 'tls::controller_ha': + controllers => $controllers, + public_virtual_ip => $public_virtual_ip, + internal_virtual_ip => $internal_virtual_ip, + horizon_crt => $horizon_crt, + horizon_key => $horizon_key, + external_ip => $public_virtual_ip + } +} + + diff --git a/deployment_scripts/puppet/manifests/site_compute.pp b/deployment_scripts/puppet/manifests/site_compute.pp new file mode 100644 index 0000000..30db18c --- /dev/null +++ b/deployment_scripts/puppet/manifests/site_compute.pp @@ -0,0 +1,19 @@ +$fuel_settings = parseyaml(file('/etc/astute.yaml')) +$tls_hash = $::fuel_settings['tls'] +$horizon_crt = $tls_hash['horizon_crt'] +$horizon_key = $tls_hash['horizon_key'] +$nodes_hash = $::fuel_settings['nodes'] + +if ($::fuel_settings['deployment_mode'] == 'multinode') { + $controller = filter_nodes($nodes_hash,'role','controller') + $internal_ip = $controller[0]['internal_address'] + $public_ip = $controller[0]['public_address'] +} +else { + $public_ip = $::fuel_settings['public_vip'] + $internal_ip = $::fuel_settings['management_vip'] +} +class { 'tls::compute': + public_virtual_ip => $public_ip, + internal_virtual_ip => $internal_ip, +} \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/tls/files/format.sh b/deployment_scripts/puppet/modules/tls/files/format.sh new file mode 100644 index 0000000..a0d8ec1 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/files/format.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +CRT=$1 +KEY=$2 +SSL_PATH=$3 +############################################################################################################################ +# Horizon part +############################################################################################################################ +echo "-----BEGIN CERTIFICATE-----" > $SSL_PATH/horizon.crt +echo $CRT | awk -F "-----" '{ print $3}' | sed 's/ /\n/g' | sed '/^$/d' >> $SSL_PATH/horizon.crt +echo "-----END CERTIFICATE-----" >> $SSL_PATH/horizon.crt + +echo "-----BEGIN PRIVATE KEY-----" > $SSL_PATH/horizon.key +echo $KEY | awk -F "-----" '{ print $3}' | sed 's/ /\n/g' | sed '/^$/d' >> $SSL_PATH/horizon.key +echo "-----END PRIVATE KEY-----" >> $SSL_PATH/horizon.key + +############################################################################################################################ +# Nova part +############################################################################################################################ +echo "-----BEGIN CERTIFICATE-----" > /etc/nova/tls/nova.crt +echo $CRT | awk -F "-----" '{ print $3}' | sed 's/ /\n/g' | sed '/^$/d' >> /etc/nova/tls/nova.crt +echo "-----END CERTIFICATE-----" >> /etc/nova/tls/nova.crt + +echo "-----BEGIN PRIVATE KEY-----" > /etc/nova/tls/nova.key +echo $KEY | awk -F "-----" '{ print $3}' | sed 's/ /\n/g' | sed '/^$/d' >> /etc/nova/tls/nova.key +echo "-----END PRIVATE KEY-----" >> /etc/nova/tls/nova.key diff --git a/deployment_scripts/puppet/modules/tls/manifests/compute.pp b/deployment_scripts/puppet/modules/tls/manifests/compute.pp new file mode 100644 index 0000000..fd306bd --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/compute.pp @@ -0,0 +1,12 @@ +class tls::compute( + $public_virtual_ip, + $internal_virtual_ip, +) { + include tls::params + class { 'tls::nova::novnc_compute': + public_virtual_ip => $public_virtual_ip, + internal_virtual_ip => $internal_virtual_ip, + nova_compute_service => $tls::params::nova_compute_service + } +} + diff --git a/deployment_scripts/puppet/modules/tls/manifests/controller.pp b/deployment_scripts/puppet/modules/tls/manifests/controller.pp new file mode 100644 index 0000000..85090e6 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/controller.pp @@ -0,0 +1,52 @@ +class tls::controller( + $horizon_crt, + $horizon_key, + $external_ip, + $bind_address +) { + $server_hostname = $external_ip + include tls::params + $apache_tls_path = $tls::params::apache_tls_path + + #format crt and key files + file { "$apache_tls_path" : + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + } + + file { '/etc/nova/tls' : + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + before => Exec['format.sh'] + } + + file {'format.sh': + path =>'/usr/bin/format.sh', + mode => '0744', + owner => root, + group => root, + source => "puppet:///modules/tls/format.sh", + require => File["$apache_tls_path"] + } + exec {'format.sh': + command => "bash -c \"format.sh \'${horizon_crt}\' \'${horizon_key}\' \'${apache_tls_path}\'\"", + path => '/usr/sbin:/usr/bin:/sbin:/bin', + require => File['format.sh'], + before => File['openstack-dashboard.conf'], + } + class { 'tls::horizon::horizon': + horizon_crt => $horizon_crt, + horizon_key => $horizon_key, + bind_address => $bind_address + } + class { 'tls::nova::novnc_controller': + server_hostname => $server_hostname, + novnc_service => $tls::params::nova_novnc_service, + httpd_service => $tls::params::httpd_service_name + } +} + diff --git a/deployment_scripts/puppet/modules/tls/manifests/controller_ha.pp b/deployment_scripts/puppet/modules/tls/manifests/controller_ha.pp new file mode 100644 index 0000000..0828f78 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/controller_ha.pp @@ -0,0 +1,29 @@ +class tls::controller_ha( + $controllers, + $public_virtual_ip, + $internal_virtual_ip, + $horizon_crt, + $horizon_key, + $external_ip +) { + $nodes_hash = $::fuel_settings['nodes'] + $node = filter_nodes($nodes_hash,'name',$::hostname) + $internal_address = $node[0]['internal_address'] + $bind_address = $internal_address + class { 'tls::controller': + horizon_crt => $horizon_crt, + horizon_key => $horizon_key, + external_ip => $external_ip, + bind_address => $bind_address + } + class { 'tls::horizon::horizon_ha': + controllers => $controllers, + public_virtual_ip => $public_virtual_ip, + internal_virtual_ip => $internal_virtual_ip, + } + exec { "ha_proxy_restart": + command => "/usr/sbin/crm resource restart p_haproxy", + require => Class['tls::horizon::horizon_ha'], + } +} + diff --git a/deployment_scripts/puppet/modules/tls/manifests/horizon/horizon.pp b/deployment_scripts/puppet/modules/tls/manifests/horizon/horizon.pp new file mode 100644 index 0000000..3e72dd7 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/horizon/horizon.pp @@ -0,0 +1,85 @@ +class tls::horizon::horizon( + $horizon_crt, + $horizon_key, + $bind_address, +) { + include tls::params + + $root_url = $tls::params::root_url + $ssl_cert_file = $tls::params::tls_cert_file + $ssl_key_file = $tls::params::tls_key_file + + #update horizon config file + exec { "USE_SSL": + command => "/bin/sed -i \"s/#USE_SSL = False/USE_SSL = True/\" $tls::params::horizon_settings_file", + unless => "/bin/egrep \"^USE_SSL = True\" $tls::params::horizon_settings_file", + notify => Service[$tls::params::httpd_service_name], + } + exec { "CSRF_COOKIE_SECURE": + command => "/bin/sed -i \"s/#CSRF_COOKIE_SECURE = True/CSRF_COOKIE_SECURE = True/\" $tls::params::horizon_settings_file", + unless => "/bin/egrep \"^CSRF_COOKIE_SECURE = True\" $tls::params::horizon_settings_file", + notify => Service[$tls::params::httpd_service_name], + } + exec { "SESSION_COOKIE_SECURE": + command => "/bin/sed -i \"s/#SESSION_COOKIE_SECURE = True/SESSION_COOKIE_SECURE = True/\" $tls::params::horizon_settings_file", + unless => "/bin/egrep \"^SESSION_COOKIE_SECURE = True\" $tls::params::horizon_settings_file", + notify => Service[$tls::params::httpd_service_name], + } + exec { "SESSION_COOKIE_HTTPONLY": + command => "/bin/sed -i /SESSION_COOKIE_SECURE/i\"SESSION_COOKIE_HTTPONLY = True\" $tls::params::horizon_settings_file", + unless => "/bin/egrep \"^SESSION_COOKIE_HTTPONLY = True\" $tls::params::horizon_settings_file", + notify => Service[$tls::params::httpd_service_name], + } + + if $::osfamily == 'Debian' { + exec { "ssl_mod": + command => "/usr/sbin/a2enmod ssl", + notify => Service[$tls::params::httpd_service_name], + } + exec { "header_mod": + command => "/usr/sbin/a2enmod headers", + notify => Service[$tls::params::httpd_service_name], + } + exec { "rewrite": + command => "/usr/sbin/a2enmod rewrite", + notify => Service[$tls::params::httpd_service_name], + } + } elsif($::osfamily == 'RedHat') { + package { 'mod_ssl': + ensure => present, + notify => Service[$tls::params::httpd_service_name], + } + } + + #update apache config file + file { 'openstack-dashboard.conf' : + ensure => present, + path => $tls::params::apache_conf_file, + owner => 'root', + group => 'root', + mode => '0755', + content => template('tls/openstack-dashboard.conf.erb'), + notify => Service[$tls::params::httpd_service_name], + } + + file { 'port.conf' : + ensure => present, + path => $tls::params::apache_port_file, + owner => 'root', + group => 'root', + mode => '0755', + content => template('tls/port.conf.erb'), + notify => Service[$tls::params::httpd_service_name], + } + + file { 'vhost.conf' : + ensure => present, + path => $tls::params::apache_vhost_file, + owner => 'root', + group => 'root', + mode => '0755', + content => template('tls/vhost.erb'), + notify => Service[$tls::params::httpd_service_name], + } + +} diff --git a/deployment_scripts/puppet/modules/tls/manifests/horizon/horizon_ha.pp b/deployment_scripts/puppet/modules/tls/manifests/horizon/horizon_ha.pp new file mode 100644 index 0000000..cf44f70 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/horizon/horizon_ha.pp @@ -0,0 +1,74 @@ +class tls::horizon::horizon_ha ( + $controllers, + $public_virtual_ip, + $internal_virtual_ip, +) { + + require tls::horizon::horizon + include tls::params + + Haproxy::Service { use_include => true } + Haproxy::Balancermember { use_include => true } + + $haproxy_config_options = { + 'option' => ['ssl-hello-chk', 'tcpka'], + 'stick-table' => 'type ip size 200k expire 30m', + 'stick' => 'on src', + 'balance' => 'source', + 'timeout' => ['client 3h', 'server 3h'], + 'mode' => 'tcp', + } + + haproxy::listen { 'horizon-ssl': + order => '017', + ipaddress => $public_virtual_ip, + ports => '443', + options => $haproxy_config_options, + mode => 'tcp', + } + + haproxy::balancermember { 'horizon-ssl': + order => '017', + listening_service => 'horizon-tls', + server_names => filter_hash($controllers, 'name'), + ipaddresses => filter_hash($controllers, 'internal_address'), + ports => '443', + options => 'weight 1 check', + define_cookies => false, + define_backups => false, + } + + ################################################################################## + + $haproxy_config_options_nova = { + 'option' => ['ssl-hello-chk', 'tcpka'], + 'mode' => 'tcp', + } + + haproxy::listen { 'nova-novncproxy': + order => '170', + ipaddress => $public_virtual_ip, + ports => '6080', + options => $haproxy_config_options_nova, + mode => 'tcp', + } + + haproxy::balancermember { 'nova-novncproxy': + order => '170', + listening_service => 'horizon-tls', + server_names => filter_hash($controllers, 'name'), + ipaddresses => filter_hash($controllers, 'internal_address'), + ports => '6080', + options => 'check', + define_cookies => false, + define_backups => false, + } + ###################################################################################### + + + service { 'haproxy': + enable => true, + ensure => running, + } + +} \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/tls/manifests/nova/novnc_compute.pp b/deployment_scripts/puppet/modules/tls/manifests/nova/novnc_compute.pp new file mode 100644 index 0000000..83b5ff6 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/nova/novnc_compute.pp @@ -0,0 +1,17 @@ +class tls::nova::novnc_compute ( + $public_virtual_ip, + $internal_virtual_ip, + $nova_compute_service +) { + $novncproxy_base_url = "https://${public_virtual_ip}:6080/vnc_auto.html" + + nova_config { + 'DEFAULT/novncproxy_base_url': value => $novncproxy_base_url; + 'DEFAULT/ssl_only': value => 'True'; + } ~> Service["$nova_compute_service"] + + service { "$nova_compute_service": + enable => true, + ensure => running, + } +} \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/tls/manifests/nova/novnc_controller.pp b/deployment_scripts/puppet/modules/tls/manifests/nova/novnc_controller.pp new file mode 100644 index 0000000..be5b51e --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/nova/novnc_controller.pp @@ -0,0 +1,24 @@ +class tls::nova::novnc_controller ( + $server_hostname, + $novnc_service, + $httpd_service +) { + $novncproxy_base_url = "https://${server_hostname}:6080/vnc_auto.html" + + nova_config { + 'DEFAULT/novncproxy_base_url': value => $novncproxy_base_url; + 'DEFAULT/ssl_only': value => 'True'; + 'DEFAULT/cert': value => '/etc/nova/tls/nova.crt'; + 'DEFAULT/key': value => '/etc/nova/tls/nova.key'; + } ~> Service["$novnc_service"] + + service { "$novnc_service": + enable => true, + ensure => running, + } + + service { $httpd_service: + enable => true, + ensure => running, + } +} \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/tls/manifests/params.pp b/deployment_scripts/puppet/modules/tls/manifests/params.pp new file mode 100644 index 0000000..cf7a69d --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/manifests/params.pp @@ -0,0 +1,31 @@ +class tls::params { + if $::osfamily == 'Debian' { + $httpd_service_name = 'apache2' + $horizon_settings_file = '/etc/openstack-dashboard/local_settings.py' + $usergroup = 'nogroup' + $nova_compute_service = 'nova-compute' + $nova_novnc_service = 'nova-novncproxy' + $apache_tls_path = '/etc/apache2/TLS' + $tls_cert_file = '/etc/apache2/TLS/horizon.crt' + $tls_key_file = '/etc/apache2/TLS/horizon.key' + $root_url = '/horizon' + $apache_conf_file = '/etc/apache2/conf-available/openstack-dashboard.conf' + $apache_vhost_file = '/etc/apache2/sites-available/openstack-dashboard.conf' + $apache_port_file = '/etc/apache2/ports.conf' + } elsif($::osfamily == 'RedHat') { + $httpd_service_name = 'httpd' + $horizon_settings_file = '/etc/openstack-dashboard/local_settings' + $usergroup = 'nobody' + $nova_compute_service = 'openstack-nova-compute' + $nova_novnc_service = 'openstack-nova-novncproxy' + $apache_tls_path = '/etc/httpd/TLS' + $tls_cert_file = '/etc/httpd/TLS/horizon.crt' + $tls_key_file = '/etc/httpd/TLS/horizon.key' + $root_url = '/dashboard' + $apache_conf_file = '/etc/httpd/conf.d/openstack-dashboard.conf' + $apache_vhost_file = '/etc/httpd/conf.d/ssl.conf' + $apache_port_file = '/etc/httpd/conf.d/ports.conf' + } else { + fail("unsupported family ${::osfamily}") + } +} diff --git a/deployment_scripts/puppet/modules/tls/spec/classes/init_spec.rb b/deployment_scripts/puppet/modules/tls/spec/classes/init_spec.rb new file mode 100644 index 0000000..5f81ad9 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/spec/classes/init_spec.rb @@ -0,0 +1,7 @@ +require 'spec_helper' +describe 'https' do + + context 'with defaults for all parameters' do + it { should contain_class('https') } + end +end diff --git a/deployment_scripts/puppet/modules/tls/spec/spec_helper.rb b/deployment_scripts/puppet/modules/tls/spec/spec_helper.rb new file mode 100644 index 0000000..2c6f566 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/deployment_scripts/puppet/modules/tls/templates/openstack-dashboard.conf.erb b/deployment_scripts/puppet/modules/tls/templates/openstack-dashboard.conf.erb new file mode 100644 index 0000000..fbf0296 --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/templates/openstack-dashboard.conf.erb @@ -0,0 +1,58 @@ +# +# This file autogenerated by Puppet +# Do not edit, changes will be overwritten +# +<% +if @memorysize_mb.to_i < 1200 or @processorcount.to_i <= 3 + wsgi_daemon_processes = 3 + wsgi_daemon_threads = 10 +else + wsgi_daemon_processes = @processorcount + wsgi_daemon_threads = 15 +end + +if @osfamily == 'RedHat' %> +WSGIDaemonProcess dashboard processes=<%= wsgi_daemon_processes %> threads=<%= wsgi_daemon_threads %> +WSGIProcessGroup dashboard +WSGISocketPrefix run/wsgi + +WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi +Alias /static /usr/share/openstack-dashboard/static + + + + SetOutputFilter DEFLATE + + # Make sure proxies don’t deliver the wrong content + Header append Vary User-Agent env=!dont-vary + + + + Order allow,deny + Allow from all + + + + + ExpiresActive On + ExpiresDefault "access 6 month" + + + SetOutputFilter DEFLATE + + + Order allow,deny + Allow from all + +<% +end +if @osfamily == 'Debian' %> +WSGIScriptAlias /horizon /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi +WSGIDaemonProcess horizon user=horizon group=horizon processes=<%= wsgi_daemon_processes %> threads=<%= wsgi_daemon_threads %> +WSGIProcessGroup horizon +Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/ + + Order allow,deny + Allow from all + +<% end %> diff --git a/deployment_scripts/puppet/modules/tls/templates/port.conf.erb b/deployment_scripts/puppet/modules/tls/templates/port.conf.erb new file mode 100644 index 0000000..60e0b9b --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/templates/port.conf.erb @@ -0,0 +1,21 @@ +# If you just change the port or add more ports here, you will likely also +# have to change the VirtualHost statement + +NameVirtualHost *:80 +Listen <%= @bind_address %>:80 + +<% if @osfamily == 'RedHat' -%> +NameVirtualHost *:443 +Listen <%= @bind_address %>:443 +<% else %> + + # Server Name Indication for SSL named virtual hosts is currently not + # supported by MSIE on Windows XP. + NameVirtualHost *:443 + Listen <%= @bind_address %>:443 + + + + Listen <%= @bind_address %>:443 + +<% end %> diff --git a/deployment_scripts/puppet/modules/tls/templates/vhost.erb b/deployment_scripts/puppet/modules/tls/templates/vhost.erb new file mode 100644 index 0000000..4730e7e --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/templates/vhost.erb @@ -0,0 +1,37 @@ +# +# This file autogenerated by Puppet +# Do not edit, changes will be overwritten +# + +# SSL support +<% if @osfamily == 'RedHat' -%> +LoadModule ssl_module modules/mod_ssl.so +<% end -%> + +SSLPassPhraseDialog builtin +SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000) +SSLSessionCacheTimeout 300 +SSLMutex default +SSLRandomSeed startup file:/dev/urandom 256 +SSLRandomSeed connect builtin +SSLCryptoDevice builtin + +<% if @use_syslog -%> +ErrorLog syslog:local1 +<% end -%> + + + RedirectMatch permanent ^/$ <%= @root_url %>/ + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R] + + + + RedirectMatch permanent ^/$ <%= @root_url %>/ + SSLEngine on + SSLProtocol +TLSv1 + SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!EXP:!LOW:!MEDIUM + SSLCertificateFile <%= @ssl_cert_file %> + SSLCertificateKeyFile <%= @ssl_key_file %> + \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/tls/tests/init.pp b/deployment_scripts/puppet/modules/tls/tests/init.pp new file mode 100644 index 0000000..604525b --- /dev/null +++ b/deployment_scripts/puppet/modules/tls/tests/init.pp @@ -0,0 +1,13 @@ +# The baseline for module testing used by Puppet Labs is that each manifest +# should have a corresponding test manifest that declares that class or defined +# type. +# +# Tests are then run by using puppet apply --noop (to check for compilation +# errors and view a log of events) or by fully applying the test in a virtual +# environment (to compare the resulting system state to the desired state). +# +# Learn more about module testing here: +# http://docs.puppetlabs.com/guides/tests_smoke.html +# +include tls::controller_ha +include tls::compute diff --git a/environment_config.yaml b/environment_config.yaml new file mode 100644 index 0000000..b17ae91 --- /dev/null +++ b/environment_config.yaml @@ -0,0 +1,13 @@ +attributes: + horizon_crt: + value: "" + label: "CRT" + description: "Certificate .crt content" + weight: 10 + type: "password" + horizon_key: + value: "" + label: "Key" + description: "Certificate .key content" + weight: 10 + type: "password" \ No newline at end of file diff --git a/figures/tls-plugin.png b/figures/tls-plugin.png new file mode 100644 index 0000000000000000000000000000000000000000..c7a4e48c6584ef79fcb543e3ebaacb4ee42c18d8 GIT binary patch literal 7933 zcmd6sc{tSXyZ8}VDlK-(Qlto#tYs;(?@QJ}gk+h?HW*_~QkE=3$mo-gefuDc#$b|t zE4$2?k;pbP2xA-0;M;P3*Y|gw>s;6QUFY|QVP@XX{oMEc+{^2^#TXfAo?zi+p`oEU zp{=EELPK+8mijl0iH`cJ4%56w{YC3zqIrj=toQ63^$or2ZT;IcG!+TQcJ4D!-!p@> ztbAx_Sey5MXxo4V4`^ukleE=un+4brusB0Li;1>nip{#11**gDR)LAJS4O7TBV(BT zyx4qC&GQ1YT$G#Fd#;}6t!Al@I!r8K>RJZsT<=n<{m;d8_UQ;|J$p5nKrheNsrW*U z9%41}QuWLkI7wkjK-$G4q38H0oP5cosawHkMn-yOs(EC}o=_neMnlK+uNT$vV>?9z z&32m8sx-9prw(5n67ap+e?G*>bP975FL+J;=M&UtUmqoBWn~2`XFJ{gy^@Buk6zeY zC3F|FZvH$6FIkAKs`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5PTxs%o6@nC*KDM{0^9wl+ z8>>2Wrs)qu`})p_x}ZGrsw^CWF>cKRA|h-zw%|U(oQC(}8)CjL_Ub2i8)_TfrPSs1D=bTs{ zqDyHqlI?O%lHK%_iTL&cIPg68jZQnAaRBTqte@chs3uK-UQ^@gqJ5o*R4hwubt@na zcSyFTYckEXEp2v#RyKy&wbWT7)xtN{O<1ZX!;I#ZDqa}Nyba~S&ezCmxH7H_LtP)n zO;9Ql%m;bFi#2y~y3n{5OkSJVqQsP|D48}SY^NJG!V!%PQ2uWqttmjPsy6-XkR04tpnmY5R=^hvufey!L zL~>KAmt>)rloaJ@{-A?iEjV$zlO4F^_#RGX1P?6-JQS2K0{U51p^8ch0oUwlnL6T# ze%Im(^QnNVT|@=kjoHkp6qVT`;rVx^WJ7xo+5-cx;Qc}6>fkB1SN``dmfHr{G^$m9 zC-|iKRzn_J#ms)-RW6u2WuO@WF|B~X_!z;St6jsrFR&Knam?U!?@-Dka!c>Mtn~Gy zk}7-%lZ8g6*B$Ki%qQi+YW)-3ocq}s78gdnDvFFoT$AY|Jh1L}uQ`2ixeaTk7Srq* z7&CEAa(D4T(Dkf;^g~|#e1cqS6B;^a> zAgPdue&Z97gafX4m*4c6fjn`{;-bYy*if^A1QT($8z(`M*(YzkpX6;yr+FHa$tx(1 z6r!TlAs=Joy5f}&VG?9T<;d#~A^w^mvg@u_U^z395GW)qcEEkvR0xDVraOhPiT`KU zW7ZASH|_o7$BzcY(jkM;(%VvF9oacnmL(x6SyocAAstycBEb~Eiy4?(?e91Fw^O|{ zSRxiF8h$ymr{>hu!>@9*qzL5eCo$@8jV>Vqf(AGap+lJp7u(-dN!qI^f#4236WQj7 zCS&Gy+na@0DMQ6Y(E~sKZ?WwEK4jzfXye!b(IRiU45uy(|G)pz literal 0 HcmV?d00001 diff --git a/metadata.yaml b/metadata.yaml new file mode 100644 index 0000000..d3658c7 --- /dev/null +++ b/metadata.yaml @@ -0,0 +1,34 @@ +# Plugin name +name: tls +title: TLS plugin +# Plugin version +version: 1.0.0 +# Description +description: Enables the Transport Layer Security (TLS) protocol to secure openstack +# Required fuel version +fuel_version: ['6.0'] + +# The plugin is compatible with releases in the list +releases: + - os: ubuntu + version: 2014.2-6.0 + mode: ['ha', 'multinode'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/ubuntu + - os: centos + version: 2014.2-6.0 + mode: ['ha', 'multinode'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/centos + - os: ubuntu + version: 2014.2-6.0.1 + mode: ['ha', 'multinode'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/ubuntu + - os: centos + version: 2014.2-6.0.1 + mode: ['ha', 'multinode'] + deployment_scripts_path: deployment_scripts/ + repository_path: repositories/centos +# Version of plugin package +package_version: '1.0.0' diff --git a/pre_build_hook b/pre_build_hook new file mode 100644 index 0000000..97a9019 --- /dev/null +++ b/pre_build_hook @@ -0,0 +1,4 @@ +#!/bin/bash +# Add here any the actions which are required before plugin build +# like packages building, packages downloading from mirrors and so on. +# The script should return 0 if there were no errors. \ No newline at end of file diff --git a/repositories/centos/.gitkeep b/repositories/centos/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/repositories/ubuntu/.gitkeep b/repositories/ubuntu/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tasks.yaml b/tasks.yaml new file mode 100644 index 0000000..ae11711 --- /dev/null +++ b/tasks.yaml @@ -0,0 +1,15 @@ +# Deployment is required for controllers +- role: ['controller'] + stage: post_deployment + type: puppet + parameters: + puppet_manifest: puppet/manifests/site.pp + puppet_modules: "puppet/modules/:/etc/puppet/modules/" + timeout: 360 +- role: ['compute'] + stage: post_deployment + type: puppet + parameters: + puppet_manifest: puppet/manifests/site_compute.pp + puppet_modules: "puppet/modules/:/etc/puppet/modules/" + timeout: 360