Commit Graph

103 Commits

Author SHA1 Message Date
Rodrigo Barbieri 0967f6ec4e Add cache_time for identity
This patch adds a config option to allow
configuring the cache_time for identity elements.

It is also including a complementary fix for
change I49e46e010c543f831959581b2122f59068f2c07b
that missed adjusting the correct template, and
used the wrong comparison "is not None".

Closes-bug: #2054418
Related-bug: #1771114
Change-Id: I57d376eb6c1f0f38cdd028aacf397aaf7f3a1cda
2024-03-19 16:40:19 -03:00
zhhuabj b4ee292bb6 Support disabling apache wsgi socket rotation
Bug LP 1863232 introduced a new Apache configuration option called
WSGISocketRotation which allows users to disable wsgi socket
rotation. This patch makes this configurable with a new
wsgi-socket-rotation config option that defaults to the Apache
default and can optionally be set to False.

Closes-Bug: #2021550
Change-Id: Ia5852c3ebe84bd0355670f262cbe5e1cd433a08d
2023-09-04 18:33:51 +08:00
Corey Bryant 16b009d743 Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* update charmcraft_channel to 2.x/stable

Change-Id: I6893deebdd105fb794dc06907b9366354d3e4ce0
2023-08-02 14:18:10 -04:00
Edward Hope-Morley 0cb787bb9d Make role-cache-expiration configurable
We use a default expiration_time (dogpile-expiration-time)
of 600s which means that role assignments will take up to
this amount of time before all caches are updated to
reflect changes. This may not be suitable for some clouds
that make frequent changes to role assignments and lowering
the global value is not recommended so this overrides the
[role] cache_time to a more appropriate value and also
makes it configurable. We leave default value as None so
that the global value is still inherited but this at least
allows it to be customised.

Change-Id: I49e46e010c543f831959581b2122f59068f2c07b
Closes-Bug: #1771114
2023-06-09 16:29:59 +01:00
Corey Bryant 645ee87686 Add Antelope support
* sync charm-helpers to classic charms
* change openstack-origin/source default to antelope
* align testing with antelope
* add new antelope bundles
* add antelope bundles to tests.yaml
* add antelope tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases

Change-Id: Iae257f880194aebfd8ba3002b7cf74a84fcfb9c9
2023-03-07 19:07:12 +00:00
Arif Ali b5c4eb2eae
Add auth_ttl into keystone.conf
There is a requirement for some end users where we need to specify
auth_ttl to a higher level. This should help with these users

Change-Id: Ifd515d7c103a6b24c4f5da500442406f04fb372f
2023-01-19 08:09:53 +00:00
Corey Bryant 29d03fc673 Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: Idf4a6cd1e0888576f890b00aa5b343936900d6dd
2022-08-26 18:40:36 +00:00
Hemanth Nakkina f5d9b9ed40 New option default_authorization_ttl
Add new option default_authorization_ttl used for
federation to set validity of group memberships
coming from a mapping.

Closes-Bug: #1970388
Change-Id: I4a8dbc501e14d1201ceed27077554924c56e3abd
2022-05-16 12:05:15 +05:30
Alex Kavanagh 7508c6104e Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga

Change-Id: I82a3ae55422e0871bddf37debf1089c9a9a3e843
2022-04-05 15:11:41 +01:00
Corey Bryant 152e5b6cfe Support configurable dogpile cache expiration
The [cache]/expiration_time currently caches items for the default
of 600s and is not configurable via the charm. This change adds a
dogpile-cache-expiration config option that will default to 600s
so as not to cause any behavior changes by default.

Closes-Bug: #1899117
Change-Id: I639b2b77d5db69744897b6798613a797d05fe23b
Co-authored-by: Chris MacNaughton <chris.macnaughton@canonical.com>
2021-04-07 09:05:09 +02:00
Nobuto Murata 3643aa963c Update worker-multiplier config description
Based on the change in charm-helpers:
https://github.com/juju/charm-helpers/pull/553

Related-Bug: #1843011
Change-Id: Ie43e23d9f70cd03a7dc96471874bbbc96b1f7bbb
2021-03-30 11:11:47 +09:00
Peter Matulis f111b5bdaf Review README
General review.

Apply REAME template.

Minor correction in config.yaml

Change-Id: Ib5fe0f25b9f02a0f808b0441d6c2e0f4ea217167
2020-11-25 11:54:13 -05:00
Liam Young 57b9d62aaf Make catalog-cache-expiration configurable
Expose catalog-cache-expiration which can be used to specify how
long catalogue entries will  be cached for. In addiontion inform
charms that receive notifications of endpoint changes what this
setting is.

Change-Id: I3ce72efc5bd96c987748f66a275f92941daa8fe5
2020-09-29 15:59:38 +00:00
Frode Nordahl 0a02c30fe5
Replace use of admin_token with Keystone bootstrap
Stop the use of the admin_token and use the bootstrap process
to initialize Keystone instead.  Fortunately the implementation
of the bootstrap process is both idempotent when it needs to be
and it can be safely called on an existing deployment.

Subsequently we can migrate by just removing the admin_token
from the configuration and create new credentials for use by
the charm with a call to ``keystone-manage bootstrap``.

Remove configuration templates for versions prior to Mitaka, by
doing this we need to move any configuration initially defined
prior to Miataka forward to the ``templates/mitaka`` folder.

A side effect of this migration is that newly bootstrapped
deployments will get their ``default`` domain created with a
literal ID of ``default``.  Prior to this change third party
software making assumptions about that being the case may have
had issues.

Closes-Bug: #1859844
Closes-Bug: #1837113
Related-Bug: #1774733
Closes-Bug: #1648719
Closes-Bug: #1578678
Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/191
Change-Id: I23940720c24527ee34149f035c3bdf9ff54812c9
2020-03-13 09:52:10 +01:00
Alex Kavanagh e83cb05bf8 Implement Security Compiance option for password
This feature adds a "password-security-compliance" option to the
charm to enable setting of keys in the "[security_compliance]" section
of the keystone.conf file.  This section was added in the Newton
release, and so this feature supports this from the Newton release.

It also protects the service accounts from two of the PCI-DSS options
but setting the user options 'ignore_password_expiry' and
'ignore_change_password_upon_first_use' to True to prevent the cloud
from being broken.

Change-Id: If7c54fae73188284bd9b03a53626cdf52158b994
Closes-Bug: #1776688
2020-02-05 18:10:12 +00:00
Alex Kavanagh 186769cc05 Policyd override implementation
This patchset implements policy overrides for keystone.  It uses the
code in charmhelpers.

Closed-Bug: #1741723
Change-Id: I187f4493392178d87ef7dbd67de841bbeae0c65d
2019-10-07 20:31:02 +01:00
Zuul e472adaf2f Merge "Cleanup `README.md`, `config.yaml` and `templates/`" 2018-08-17 06:16:41 +00:00
Alex Kavanagh b813360bf6 Keystone Fernet Token implementation
This patchset adds more Fernet token implementation:

1. Adds a cron job to rotate / sync keys to other units.
2. Adds additional tests around gating on config.
3. Adds rotation / syncing with more robust key handling.

Change-Id: Ied021ad83c241f241dbb5f9acdede9045e43a8a3
2018-08-14 08:35:43 +02:00
Frode Nordahl 1985c16033
Cleanup `README.md`, `config.yaml` and `templates/`
Remove configuration options which no longer have effect
(the supporting code has been removed).

Update and fix formatting of `README.md`.

Remove templates for no longer supported OpenStack releases.

Change-Id: Ibbda87738d98f6ad97da212ad1b56be88b33e9a3
2018-08-02 13:50:29 +02:00
Frode Nordahl 1e991dc28b
Add initial support for Fernet tokens
Starting OpenStack Rocky the currently used `uuid` token format
is no longer supported and we need to change to use `fernet` tokens.

This change provides basic functionalty to initialize fernet token
repository and distribute keys to non-leader units.

A configuration option is also added allowing change of token format
in a controlled manner prior to upgrading to OpenStack Rocky.

Further work is required to implement key rotation, actions etc. and
these topics will be addressed in separate commits.

The commit also fixes a instance of missing release check for writing
of `policy.json`, and a few places where writing of `policy.json`
previously was omitted.

Change-Id: I1d0ff22a5f091b02f5700412745572c246103e9e
2018-07-25 15:23:47 +02:00
Zuul 1741c597bc Merge "add instructions to config on how to retreive an auto-generated pw" 2018-05-16 06:47:05 +00:00
Frode Nordahl a66dfe1186
Add deprecation notices for old SSL options in config.yaml...
Specifically for... `enable-pki`, `https-service-endpoints` and
`use-https`.

Change-Id: Ica2dfc39dc550b1aa43e178ae29fb333eeaca572
2018-05-14 14:31:34 +02:00
Neiloy Mukerjee 329c2c880e Document archive key usage for openstack-origin
An arbitarary repository can currently be specified, but it was not yet
made clear in the documentation that a corresponding public key for
accessing this repository could be added. This change specifies that
under the description for the openstack-origin option. Public key can
be added by appending to the deb url, so the below example would work:
juju set openstack-origin nova-compute openstack-origin="deb http://ppa
.launchpad.net/billy-olsen/testfix-kilo/ubuntu vivid main|FA0FD8E1"

Change-Id: I262a2164d4f7b37b4185bdee650371de7be50a55
Closes-Bug: 1503440
2018-05-10 15:21:54 +00:00
Vern Hart 9073c5e3d7 add instructions to config on how to retreive an auto-generated pw
Change-Id: I606fc94f1c113d6429016ea9450aeb4bc103a313
Signed-off-by: Vern Hart <v-openstack@vern.com>
2018-05-03 12:22:59 +00:00
Corey Bryant 3384ddcb87 Update SSL/https documentation
The README documentation implies that use-https and
https-service-endpoints are required when enabling SSL/https
with your own CA, SSL cert, and key. Update the README and
config.yaml to explain that config options use-https and
https-service-endpoints should not be set when using ssl_*
config options.

Change-Id: I2e0140f909ef2c57182895f37cf191b6bc80157b
Closes-Bug: #1754682
2018-03-12 14:21:04 -04:00
Zuul 2ba8a56a59 Merge "Remove deploy from source support" 2018-01-12 14:42:43 +00:00
James Page e8f1fdd8a1 Remove deploy from source support
Drop support for deployment from Git repositories, as deprecated
in the 17.02 charm release.  This feature is unmaintained and has
no known users.

Change-Id: Ic054e29ef55d8890a3130af16b48f105efcf8f6a
2018-01-12 10:42:25 +00:00
James Page 1db0949c25 Add OpenStack Queens support
Keystone@Queens removes support for the v2 API; switch default
to v3 API from Queens onwards and ensure that charm users can
only provide 3 as via the preferred-api-version for >= Queens.

Change-Id: I58fcbaa7fc385bef77544be349c7d461e3e5559b
2017-12-18 10:23:53 +00:00
David Ames e1ac46f342 Update HAProxy default timeout values
The default HAProxy timeout values are fairly strict. On a busy cloud
it is common to exceed one or more of these timeouts. The only
indication that HAProxy has exceeded a timeout and dropped the
connection is errors such as "BadStatusLine" or "EOF." These can be
very difficult to diagnose when intermittent.

This charm-helpers sync pulls in the change to update the default
timeout values to more real world settings. These values have been
extensively tested in ServerStack. Configured values will not be
overridden.

Partial Bug: #1736171

Change-Id: I973962a5c1538b0d9afbebea8cebf50d938ecfb5
2017-12-11 11:37:02 -08:00
Shane Peters cebfa7f74d Cleanup config.yaml
Change-Id: I62d6452cf1372afeb99a1e1d9fb8d90adaf8909d
2017-06-14 11:10:11 +01:00
James Page 21a4e5beb1 Cap workers in containers, fix admin/pubic skew
Resync charm-helpers to pickup the latest code for calculation
of worker process configuration, creating better default
worker configuration when deploying in LXD containers.

Switch the skew between public and admin processes to favour
public 0.75/0.25 as the public API endpoints of a service will
typically get a larger number of hits.

Fixup unit test for minor behavioural change in charm-helpers.

Change-Id: I4ab1d28f907ce29d5602b48ba7a438fc3690277c
Closes-Bug: 1665270
Closes-Bug: 1686049
2017-04-26 11:43:14 +01:00
Edward Hope-Morley afd9e8badb Fix https config descriptions
Also fix and improve the README on https in the keystone charm.

Change-Id: I42e12d8d0c159e9f2d66523b17d144c1e912e676
Closes-Bug: 1647193
2017-02-13 11:23:52 +00:00
Ryan Beisner 6cd819aa3c Update amulet test definitions for Newton
- Remove Precise-Icehouse Amulet test definitions if they exist.

- Add Xenial-Newton Amulet test definitions.

- Add Yakkety-Newton Amulet test definitions.

- Use the percona-cluster charm in tests instead of the mysql charm.

Change-Id: Ia4c324b6fedec1dc607062a89eea7595d43c0060
2016-10-10 20:54:17 -05:00
Jenkins 9f77f74a97 Merge "Change worker-multiplier to float" 2016-07-14 09:37:22 +00:00
Corey Bryant 33953f67a6 Enable API to run under apache2 when deployed from source.
The keystone charm runs the keystone API under apache2 for liberty
and above. This patch enables the keystone API to run under apache2
when deployed from source for liberty and above.

Change-Id: I5eccf38aad9668248f4f94523d61f7bd40ed5c30
2016-07-13 19:25:35 +00:00
Billy Olsen 4ab385f62f Change worker-multiplier to float
Change the worker-multiplier to a floating point config option type
instead of integer. This allows users to specify workers to be less
than the number of CPUs, which is useful in deployments with multiple
services deployed into containers on top of bare metal.

The fix is to simply change the config option type and to sync in
the necessary update from lp:charm-helpers.

Partial-Bug: #1602444

Change-Id: I534165aa2fc45a28f6b3f3bb2f708789daf5ba8c
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2016-07-12 16:39:56 -07:00
David Ames b032915cb1 DNS HA
Implement DNS high availability. Pass the correct information to
hacluster to register a DNS entry with MAAS 2.0 or greater rather
than using a virtual IP.

Charm-helpers sync to bring in DNS HA helpers

Change-Id: I62bb49fbaebdd3c787f96f4b6ad107f8e3e368a7
2016-06-23 09:15:49 +01:00
Corey Bryant df578e943b Add defaults for openstack-origin-git config option
openstack-origin-git currently only supports YAML that specifies
the git repositories to deploy from.

This adds support for default openstack-origin-git values. The
default values supported are: icehouse, kilo, liberty, mitaka,
and master.  For example: openstack-origin-git=master.

Change-Id: I03839dc0abfb7465578cbb4eedfdab5043d053e6
2016-06-16 14:30:18 +00:00
Billy Olsen ec9f5ddfeb Add hardening support
Add charmhelpers.contrib.hardening and calls to install,
config-changed, upgrade-charm and update-status hooks. Also
add new config option to allow one or more hardening
modules to be applied at runtime.

Change-Id: I5f85699adcb5c37ffcda971a3ed5f1f965fd7fb6
2016-03-24 13:17:48 +00:00
Liam Young c283a1c922 Enable Keystone v3 API
This changes enables the Keystone v3 api. It can be toggled on and off via the
preferred-api-version option.

When services join the identity-service relation they will be presented with a
new parameter api_version which is the maximum api version the keystone charm
supports and matches what was set via preferred-api-version.

If preferred-api-version is set to 3 then the charm will render a new
policy.json which adds support for domains etc when keystone is checking
authorisation. The new policy.json requires an admin domain to be created and
specifies that a user is classed as an admin of the whole cloud if they have
the admin role against that admin domain.

The admin domain, called admin_domain, is created by the charm. The name of
this domain is currently not user configurable. The role that enables a user to
be classed as an admin is specified by the old charm option admin-role. The
charm grants admin-role to the admin-user against the admin_domain.

Switching a deployed cloud from preferred-api-version 2 to
preferred-api-version 3 is supported. Switching from preferred-api-version 3 to
preferred-api-version 2 should work from the charm point of view but may cause
problems if there are duplicate users between domains or may have unintended
consequences like escalating the privilege of some users so is not recommended.

Change-Id: I8eec2a90e0acbf56ee72cb5036a0a21f4a77a2c3
2016-03-09 11:05:33 +00:00
James Page d80c7fefb0 change string debug and verbose to boolean 2016-02-18 09:59:57 +00:00
David Ames 5844751e01 Fix lp:1522130 Add sane haproxy timeout defaults and make them configurable. 2015-12-03 14:47:11 -08:00
Seyeong Kim 4f82079aa9 change string debug and verbose to boolean
LP#1398783
2015-10-21 23:54:06 +00:00
Corey Bryant 80dccdd02b Action-managed upgrade support. 2015-10-07 12:20:36 -04:00
Corey Bryant 8e740785a9 Fix lint error in config.yaml 2015-07-17 01:29:31 +00:00
Edward Hope-Morley db4d39dc52 [trivial] Cleanup config.yaml
Partially-Closes-Bug: 1473426
2015-07-10 15:14:30 +01:00
Corey Bryant c9393bb3c3 [billy-olsen,r=corey.bryant] Provide support for user-specified public endpoint hostname. 2015-06-10 16:44:02 -04:00
Billy Olsen 05a260d573 Change config option to os-public-hostname 2015-06-03 11:24:05 -07:00
Billy Olsen 4766a0acc3 [wolsen,r=] Add support for overriding public endpoint addresses.
Adds in the config option for overriding public endpoint addresses
and introduces a unit tests to ensure that the override for the
public address is functioning correctly.

Closes-Bug: #1398182
2015-06-02 14:30:32 -07:00
Corey Bryant 4d99449780 Merge next branch 2015-04-01 15:15:49 +00:00