43 Commits

Author SHA1 Message Date
Alex Kavanagh
21aa29f8a9 Keystone v2 and v3 manual and amulet/bundle testing
This provides both keystone v2 and v3 setup for testing barbican
manually.  It demonstrates how to set up a project/tenant in each v3 and
v2 and the how to store a secret.  Then only differences are in the
authentication with Keystone.  However, it does demonstrate both
working.

This change also contains the v2 and v3 keystone tests with barbican.
These are pesented as two gate-*-v2 and gate-*-v3 tests which activate
testing with keystone v2 and keystone v3.

Change-Id: Id0310da7a80ee8796eeda52b7af936ae51ed0dd9
2016-08-09 16:49:09 +00:00
Ryan Beisner
88b5bd5490 Add .gitreview and clean up repo
Add src/README.md placeholder to prevent inheritence of the
lower layer readme file in the built charm.

Add src/tox.ini and test-requirements for Amulet prep.

Update metadata.yaml for series.

Update tox.ini to minimize and clarify pep8 ignores.

Resolve flake8/pbr test-requirements version range conflict.

Remove legacy lint and test targets from Makefile, ensuring
these tests will execute via tox.  Trusty test runners have
no py35 interpreter, and would have failed in running both
py34 and py35 in succession as it was defined.

Update src/layer.yaml repo value to point to official location
and remove unnecessary options.

Change-Id: Ia663fda7761dca6dc08583314f00beedf1db60cc
2016-08-03 18:54:57 +00:00
Alex Kavanagh
0fbfbdfc74 Merge pull request #3 from gnuoy/feature/ssl-support
Add SSL support
2016-07-21 10:27:41 +01:00
Liam Young
ed09c1b5a9 Tidyup formating 2016-07-21 09:24:30 +00:00
Liam Young
d36a55f4ac Add SSL support
* Change charm to inherit layer:openstack-api as this is an API charm
  This adds the SSL config options to the charms config.yaml
* Barbican now servers the API service through Apache so add code
  to manage /etc/apache2/conf-available/barbican-api.conf
* Switch BarbicanConfigurationAdapter to be a child of
  APIConfigurationAdapter to inherit methods for configuring haproxy
  and apache2.
* Add reactive handle to configure ssl when identity relation is
  complete
* Move Juno template dir to mitaka as mitaka is the earliest
  supported release.
* Updated host_href in barbican.conf to specify the correct external
  url for accessing the service. Without this clients are redirected
  to the wrong location.
2016-07-18 13:09:36 +00:00
Liam Young
6edcea4d2e Merge pull request #2 from ajkavanagh/feature/add-hsm-interface
Add barbican-hsm-plugin interface support
2016-07-14 15:59:42 +01:00
Alex Kavanagh
73190ca40e Change the BarbicanAdapters class parent
charms.openstack has been refactered such that OpenStackRelationAdapters has
a new derived class called OpenStackAPIRelationAdapters which contains the
amqp, db and cluster relations.  As Barbican needs those, the BarbicanAdapters
needs to be derived from the more specialised class.
2016-07-14 10:05:47 +00:00
Alex Kavanagh
281e0a6896 Renamed barbican-hsm-plugin to barbican-hsm
The interface name has been changed, so this ripples it through the charm.
Also fixed the README, and ensured that tox.it has a pep8 target.
2016-07-13 15:42:33 +00:00
Alex Kavanagh
8fe19c4a3d Put charm into its own venv
This adds the venv option to the layer configuration and removes the
custom install hook as it's no longer needed.
2016-07-13 13:43:53 +00:00
Alex Kavanagh
c7367af5ec Add final unit tests
Had missed off unit tests for the mkek and hmac generation code in the
class.
2016-07-13 09:31:51 +00:00
Alex Kavanagh
e019366bf3 Change test-requirements.txt ajkavanagh to openstack
Changed from:
git+https://.../ajkavanagh/charms.openstack.git#egg=charms-openstack
to:
git+https://.../openstack/charms.openstack.git#egg=charms-openstack

This is because the tests should come from the openstack master branch.
2016-07-12 13:53:47 +00:00
Alex Kavanagh
6d0248e9d9 Add barbican-hsm-plugin interface support
The barbican-hsm-plugin interface provides a mechanism for the Barbican
charm to communicate with an HSM plugin.  The plugin (from the Barbican
perspective) is provided as a PKCS#11 compliant library (.so) and so is
local to the Barbican installation.  Thus, the hsm-plugin charms are
subordinate to the Barbican charm and run on the same unit.

This change also provides two actions (generate-mkek and generate-hmac)
which are 'one-off' operations to initialise the HSM with the global
master keys.

Add a note to the README that the generate-mkek and generate-hmac
actions may only be done once as the HSM may reject overwriting the key.

Add Apache2.0 LICENSE and license headers to files
Removed redundant copyright file

Change the reference for the internal port to 9311 The barbican project
changed the INTERNAL port to the same as the PUBLIC port.

Add in seed_file and seed_length to template. These are needed for a
change in Barbican to support seeding the RNG in the HSM if required.
They are set to /dev/random and 32.

Fetch the barbican sources from a PPA (for bug: 1599550)

Remove the trusty support for Py3 from install hook
2016-07-12 12:35:51 +00:00
Liam Young
9c7c6bbdca Merge pull request #1 from ajkavanagh/feature/convert-to-layers
Feature/convert to layers + assess_status()
2016-06-16 13:36:55 +01:00
Alex Kavanagh
79d7fc3b89 Change charm so that it works with assess_status()
And also demo the function to choose the release charm to use.
2016-06-10 14:38:40 +00:00
Alex Kavanagh
87566760c2 added apache 2.0 copyright as project will be under openstack 2016-06-06 10:07:21 +00:00
Alex Kavanagh
8f87b75f3e Move setup_amqp and setup_database to reactive handler file
They don't have any interaction with barbican charm class code so they
make better sense in the handlers file.
2016-05-25 15:09:25 +00:00
Alex Kavanagh
71f1af340f Make the charm Python3 compliant
These changes enable the charm code to work under Python2 and Python3.  All
reactive charms should be Python3 compliant.
2016-05-24 09:08:43 +00:00
Alex Kavanagh
e7d8e915ff Remove blank line from start of install.real 2016-05-23 12:17:49 +00:00
Alex Kavanagh
e29db2af63 Change module reference charmers.openstack -> charms_openstack
This is due to a change in the referenced module's namespace.
2016-05-20 17:40:07 +00:00
Alex Kavanagh
ba30ae763f Fix linting issues in test files 2016-05-20 15:08:57 +00:00
Alex Kavanagh
956554175f Remove unneeded path mangling from the test 2016-05-20 15:05:01 +00:00
Alex Kavanagh
1e48bff2e7 Add tests for lib/charm/openstack/barbican.py
These are the main 'guts' of the charm, and these tests confirm the operation
is as expected.
2016-05-20 15:04:08 +00:00
Alex Kavanagh
cdfc3d2e04 Add tests for src/reactive/barbican_handlers.py
This is a simple set of tests that just ensures that future changes to break
the events that the charm is listening on.
2016-05-20 12:30:00 +00:00
Alex Kavanagh
1ea4507ced Initial unit_tests added - NOT FUNCTIONAL at this stage
This adds in the unit_test framework but there is a name collision
between charm.openstack as a module, and charm.openstack here which the
package loader can't resolve.  Therefore, going to change the
charm.openstack package to charms.openstack to avoid the collision.
2016-05-19 18:00:23 +00:00
Alex Kavanagh
c7fc7ba5e0 Rename charm -> src to avoid package name conflicts 2016-05-19 17:58:27 +00:00
Alex Kavanagh
eac71d72cd Get charm to build
This is still missing the charm.openstack module dependency
2016-05-19 12:15:53 +00:00
Alex Kavanagh
4bbf9e0de8 Remove the charm subdir which includes the bundled charm-helpers
As part of the layered approach, charm-helpers is brought in via the
charm build process.
2016-05-19 09:02:03 +00:00
Alex Kavanagh
80f8be29e1 Move files from charm and use new layout for charms
Plus hooks into the charm.openstack module for OpenStackCharm class.
2016-05-18 15:10:21 +00:00
Alex Kavanagh
3e4be98377 move novarc to manual testing subdir 2016-05-18 14:44:44 +00:00
Alex Kavanagh
183d978ac8 Move barbican.yaml bundle to manual testing subdir 2016-05-18 14:36:02 +00:00
Alex Kavanagh
43b577b75a Mod tox.ini so that it works with new build syntax 2016-05-18 14:32:41 +00:00
Alex Kavanagh
e3f2450b39 Move manual testing/verification files to subdir 2016-05-18 14:32:03 +00:00
Alex Kavanagh
34bcc5c0c0 renamed barbican to charm 2016-05-11 14:59:20 +00:00
James Page
c9204356e6 Pop super classes 2015-12-11 17:59:00 +00:00
James Page
a7fe1df43b Introduce the Charm and CharmFactory classes 2015-12-11 17:49:56 +00:00
Liam Young
dcd640d50c Remove dummy CONFIGS 2015-12-11 15:54:04 +00:00
Liam Young
b7bc5fba4d Add secret-store.py 2015-12-11 15:41:32 +00:00
Liam Young
2086f318a8 Restart on change 2015-12-11 14:38:21 +00:00
Liam Young
9e0e7229da Fix db connect string 2015-12-11 14:20:41 +00:00
Liam Young
0c6bb990c9 Render paste ini properly and other fixes 2015-12-11 13:43:03 +00:00
Liam Young
653329d5bb Fixes 2015-12-11 10:44:45 +00:00
Liam Young
9989fd8cb3 Barbican charm build env 2015-12-11 10:32:58 +00:00
Liam Young
dceb21874f Initial commit 2015-12-11 10:31:25 +00:00