Commit Graph

135 Commits

Author SHA1 Message Date
Ghanshyam Mann 44d13c8c64 Retire openstack-chef: remove repo content
OpenStack-chef project is retiring
- https://review.opendev.org/c/openstack/governance/+/905279

this commit remove the content of this project repo

Depends-On: https://review.opendev.org/c/openstack/project-config/+/909134
Change-Id: Ida0639315944c8c7852ec37fb10f133e8ab9c455
2024-02-17 20:50:52 -08:00
Lance Albertson f052ede42b CentOS 8 support
- Update package names
- Migrate to using apache2_mod_wsgi resource and require apache2 ~> 8.6
- Update ChefSpec

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-database/+/815139
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-messaging/+/815137
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-integration-test/+/815171
Change-Id: Ib21c5b2dbd13aa57de926e71db62d042374cabd4
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 16:31:00 -07:00
Lance Albertson e76dcb39e1 Chef 17 support
- Require Chef >= 16.0
- Remove bind from Berksfile
- Update copyright years

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstackclient/+/813953
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-database/+/814032
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-messaging/+/814035
Change-Id: I5d4f38f56e5a411b83b02d2fd9fff2e013947d71
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-14 11:57:40 -07:00
Marek Szuba f70a3454c5 Make the name of default Keystone site for Apache2 a platform option
Since at least Debian 9 (Stretch) the name of the relevant site has been
'wsgi-keystone' rather than 'keystone'. Then again, as of 21.04 Ubuntu
continues to use the old site name.

Tha relevant attribute is also set for RHEL so that recipe validation
doesn't fail due to missing resource name, even though the resource in
question is currently guarded by 'if platform_family?("debian")'.

Signed-off-by: Marek Szuba <m.szuba@gsi.de>
Change-Id: I34b342d0b51cd5e11b1e5de95578ac47939895f9
2021-07-20 22:14:24 +00:00
Karim El Aammari c5211ab38f Possibility to set SSLCARevocationPath for keystone as chef default attribute "ca_revocation_path"
Also set SSLCARevocationCheck alongside SSLCARevocationPath, all one
gets by setting only the latter is warnings in Apache logs.

Note: with Apache 2.3.15 or newer enabling revocation checks causes
certificate validation to fail also when no CRLs for the given certificate
could be found. For details see
https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslcarevocationcheck

Co-authored-by: Marek Szuba <m.szuba@gsi.de>
Signed-off-by: Marek Szuba <m.szuba@gsi.de>
Change-Id: Ic64249ba32d43877f9ef0325e7156e0d15622a69
2021-07-20 13:26:02 +01:00
Lance Albertson 9ed88a8ff4 Cookstyle 6.19.5 fixes
Update ChefSpec due to changes made in apache2 cookbook.

Depends-On: https://review.opendev.org/756168
Change-Id: Ie4a830620f217f5879ae4270850214902c202dbf
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 17:13:24 -07:00
Lance Albertson c49dedfbcd Stein fixes
- Cookstyle fixes
- Refactor Berksfile to use groups so we can exclude integration testing
  cookbooks
- Update documentation
- Enable sensitive resources for template[/etc/keystone/keystone.conf]
  and execute[bootstrap_keystone] to improve security.
- Update delivery configuration to exclude integration cookbooks

[1] https://docs.openstack.org/keystone/stein/install/keystone-install-rdo.html#install-and-configure-components

Depends-On: https://review.opendev.org/701027
Depends-On: https://review.opendev.org/706101
Depends-On: https://review.opendev.org/706140
Depends-On: https://review.opendev.org/706147
Depends-On: https://review.opendev.org/706158
Change-Id: I6c5005b23ee209650911146e373c4cf082cbee9e
2020-03-23 09:58:16 -07:00
Lance Albertson 453ab3bb95 Update to apache2 ~> 8.0 cookbook
This brings us up to date with the latest apache2 cookbook which
included a major refactor in 6.0.0 removing all of the definitions and
recipe with proper resources. Instead of using the apache2_default_site
resource, directly use a template and then enable the config file using
the apache2_site resource. This gives us the most flexibility.

- Install mod_wsgi as a package on RHEL since there is no built-in
  resource for it.
- Don't set SELinux to permissive on RHEL (I tested this works properly
  with it set to enforcing).
- Remove hack for restarting apache.
- Convert web_app to template and subscribe to restarting apache.
- Remove resources to restore SELinux contexts since this taken care of
  by Chef now automatically.
- Remove unused references to log_debug in wsgi template
- Add missing WSGISocketPrefix to wsgi template
- Additional tests for keystone.conf and identity.conf
- Remove unused ldap section tests as we no longer have attributes for it
- Include additional cookbooks in Berksfile required for CI

Depends-On: https://review.opendev.org/702772

Change-Id: I717247217523e89251e4c0bead0c1a0d114ade2a
2020-01-30 09:28:25 -08:00
Lance Albertson 21255e36b4 Upgrade python2-urllib3 on CentOS
I've run into this issue on systems that already have python2-urllib3
installed, but it's older than what gets installed from the RDO
repository and breaks the db sync for keystone. By adding it here, that
will ensure it's always upgraded before we try running db sync.

Change-Id: If876315001c8136fad654d7408ec9f656ef48775
2020-01-22 16:05:30 -08:00
Jens Harbott 87d4d2ed40 Use python3 packages on Ubuntu
Python2.7 is going EOL soon, let us deploy python3 for Rocky from the
start, so we avoid having to switch later.

Also update Berksfile to allow dependency testing and require chef >= 14 now.

Change-Id: Id4c06c8fc136ae3cde97e751373049db989de21e
2019-11-26 10:46:40 +00:00
Jens Harbott f2902385ef Add a cloud_config recipe
Using a cloud config file when accessing a cloud is the modern variant
of setting lots of environment variables, so we add a new recipe that
produces a cloud config matching what we are deploying.

Clean up the old openrc template a bit.

Change-Id: I8574d9f4299be5b2a374140b461ef48e9e80ae6b
2019-08-30 14:29:33 +00:00
Jens Harbott 284d54be79 Drop admin endpoints
The admin endpoints offer no special functionality, users may talk to
the public endpoints instead. The only historic use case has been the
keystone v2 admin endpoint, but with keystone v3 API, even that is no
longer needed, except that it's use is hardcoded in keystonemiddleware.
So we prepare everything for completely getting rid of the admin
Identity endpoint, but still create it during bootstrap.

Also drop explicitly creating resources that are created during keystone
bootstrap anyway.

[0]
https://opendev.org/openstack/openstack-chef-specs/src/branch/master/specs/ocata/all/drop-admin-endpoints.rst

Depends-On: https://review.openstack.org/652052
Depends-On: https://review.openstack.org/652064
Depends-On: https://review.openstack.org/652098
Depends-On: https://review.openstack.org/652589
Change-Id: Iddfae1c2cb29217cd9aae89d56bc65fa935fcd28
2019-04-18 11:06:34 +00:00
Jens Harbott 90fd9ccf59 Add endpoint_type attribute defaulting to internalURL
This is in preparation of dropping the admin endpoint, we need this
attribute in place first so we can reference it in other cookbooks.

Change-Id: Idee227f26fcc74412873c5afd02dfcce32145ea7
2019-04-15 08:17:21 +00:00
Jens Harbott 4313c5711f Drop support for a templated catalog
This was only half-working anyway since we moved to keystone V3, so we
should just drop it. If someone wants to configure their deployment with
it, they can easily set up a wrapper for it.

Change-Id: Ifdf96502d18895e3b79dfa235fd102b42a0f4bc3
2019-04-04 12:49:31 +00:00
Jens Harbott af1d3b1485 Stop overriding auth methods
Setting the keystone option [auth]/methods by default blocks additions
like application_credential that was newly added to Keystone in Queens.
Let's stick to Keystone's defaults instead, deployments can override
these settings if they need to.

Also drop some even older version of these attributes that haven't been
used at all anymore for some time.

Change-Id: I10b31efe1e94fc69cda65e2f7fb7a669afb166ba
2019-03-01 09:15:14 +00:00
Jens Harbott e30e2cf418 Fixup keystone endpoint handling
Finish the removal of creating an admin endpoint for keystone. This was
started in [0] but some fragments were still remaining.

At the same time the option to create an internal identity endpoint that
is different from the public one is reintroduced.

[0] I01d44e48053cad7aeb92636f4b41649204006c93

Change-Id: Id74966d9f1279f725bc41c08e434230a7845bbc1
2018-07-16 12:24:46 -07:00
Zuul 41b3463312 Merge "Simplify identity endpoint" 2018-07-03 06:31:58 +00:00
Samuel Cassiba 7657e34eda Simplify identity endpoint
Per the Keystone Install Guide[1] the admin endpoint is superseded in
favor of a single public endpoint. As a result, the admin endpoint is no
longer deployed by default.

[1] https://docs.openstack.org/keystone/queens/install/keystone-install-ubuntu.html#install-and-configure-components

Depends-On: I7e1ee2fa32e5d9b816bd3624524e6680a278ed5d
Depends-On: I833cc80421be375aed202c208cf93a0165761226
Depends-On: Ife7bb6d09eafd137c6858f6ae18d4d34508928a6
Depends-On: Ic70e3adc4615b3a79a49f8cd739d7505efee91ef
Depends-On: Ic2733d94e776eaa50ad8e4a39e6d2a8c18a45d89
Depends-On: Iafb0db54b3589eea0402c0f18687344667d0208a
Depends-On: I70775929dc49ed8c00a23bc7e354ebf9e9feb7f0
Depends-On: I06d0f98e641a041ddc864f524858edc0cffbbbba
Depends-On: Ied0fb46ae8c10273fde31691b910dc2748845faf
Change-Id: I01d44e48053cad7aeb92636f4b41649204006c93
Implements: blueprint simplify-identity-endpoint
2018-06-28 16:24:31 -07:00
Jens Harbott 7d8b8b5c27 Fix token handling for keystone
In order to avoid errors when deploying multiple controller nodes, we
need to deploy credential-tokens from data bags just like we already do
for fernet-tokens. Otherwise each controller would use a different set
of tokens generated locally.

Drop the corresponding calls to keystone-manage, as they are a) not
idempotent and b) generate files that are never used anyway.

Depends-On: Icf0a8f644ddbfa61bfef124a772663e8af4e1f16
Change-Id: Idabc34d101d9fb145a205acedf8f652ebec3ad9f
2018-06-28 12:58:39 +00:00
Samuel Cassiba aff741a327 Rename keystone-main service
* rename keystone-main to keystone-public to better align with Keystone
  conventions[0]

[0] https://review.openstack.org/194442

Change-Id: I98a5d41b4de3a3d7ef680d00ac898c93c5bc2a41
2018-03-23 06:51:19 -07:00
Samuel Cassiba 8ba453b9f5 identity refactor for Pike and Chef 13
- implemented foodcritic and cookstyle corrections
- deprecated node.foo.bar method access for node['foo']['bar'] bracket syntax
- moved apt package_overrides to common cookbook

Implements blueprint modern-chef

Change-Id: I9ab420186b2f93cfc7fcc7be7c406a3176a991e1
2017-12-10 20:04:21 -08:00
Arun S A G cbbc525cc4 Use the attribute instead of method to get platform_family
Other cookbooks have switched to using the node attribute
https://github.com/openstack/cookbook-openstack-common/blob/master/attributes/default.rb#L292
Using platform_family breaks with chef-client 13.x

Closes-Bug: #1724987

Change-Id: I02fcb5d9403210d913e85487de5ef0dae6066bdc
2017-10-19 14:23:08 -07:00
Jenkins 1961a12a43 Merge "Initial identity Pike updates" 2017-09-13 14:07:00 +00:00
Samuel Cassiba 5279aa4fbc Initial identity Pike updates
- Switched default linter to cookstyle
- Renamed rake tasks to better conform with Chef conventions
- Removed deprecated credential_setup

Change-Id: I518ed83f7e19c590e7846160889faf46db274b3a
2017-08-30 23:57:20 -04:00
Jens Harbott 275c12c3a6 Drop token-flush cronjob
We now only support fernet tokens, for which token flushing is no longer
needed, see [1]. So we drop the corresponding cron job and the
attributes to configure it. This also gets rid of the error messages
which it is currently producing.

[1] https://docs.openstack.org/security-guide/identity/tokens.html#fernet-tokens

Change-Id: Ia5fe5f5d0c98ca0a77f03478edfe1777e0a89612
2017-08-21 12:26:26 +00:00
Samuel Cassiba 8a967c291a Keystone config updates for Ocata, style and lint fixes
- Keystone config updates for Ocata
- Style and lint fixes to support newer chefdk
- Rewrote metadata.rb for readability

Change-Id: Ie1d5f27a9cf8803044568a31e4dae7654b02c9a1
2017-08-02 02:17:27 -04:00
Samuel Cassiba 36d484e301 Corrects SELinux enablement
- corrects SELinux enablement for Keystone, as RHEL comes with SELinux
  enabled by default.
- removes executable bit from metadata.rb

Change-Id: I97e73bcc0d4721283067e41b988bccb1ddf6c031
2017-04-04 13:58:35 +00:00
Jens Rosenboom f8b8302aae Fixup Identity service deployment for Ocata
- Remove recipe for PKI tokens as they have been dropped from keystone
- Use Fernet tokens unconditionally
- Cleanup paste deployment according to keystone changes in Ocata

Change-Id: I28c27caacc09a3e46eca135a6c4f5a841f4715f9
2017-03-10 10:47:31 +00:00
Christoph Albers 2f858e3678 RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes
- added rabbit_transport_url

Change-Id: I0ca0fcc1e261eeadb76c9355a0f14499085d9bda
2016-12-20 11:45:20 +00:00
Jenkins b9b6b26616 Merge "Deprecated python-keystoneclient" 2016-12-20 11:01:48 +00:00
Samuel Cassiba 1cccaa0842 Deprecated python-keystoneclient
- deleted client.rb
- deprecated python-keystoneclient references

Implements blueprint newton-xenial

Change-Id: Ia1406308a9c78a0361cd0e2e0844f0e7a3cf4b9f
2016-12-14 20:11:48 -08:00
Jan Klare 9f8ba8fda6 Wait for identity endpoint instead of sleeping
* added a small ruby block with a loop to check if the keystonen admin
  endpoint is up before trying to register projects, users etc.
* will wait 60 seconds for admin endpoint to become ready and raise
  error specific exception otherwise if Timeout::Error was raised

Change-Id: Ief678b0f40685e91ced9bddde95b916f4587b330
2016-12-13 13:55:29 +00:00
Christoph Albers 4dcd956337 use_cookbook-openstackclient/identity_v3
- Removed v2 support
- Workover Endpoint creation
  Identity Endpoints now will be bootstrapped
- Removed bootstrap_token
- Added domain_creation
- Edited openrc to work with itendity_v3
- changed "tenant"-naming to project
- Removed unused files and functions
  providers/register.rb
  spec/register_spec.rb
  resources/register.rb
  libraries/machters.rb
- rewrote specs
- updated readme
- added apache_site disable keystone since
  ubuntu auto-enables it
- bumbed ubuntu version to 16.04

Change-Id: I0f8955f05de9b33711c54b9a198f45018cceb8e1
2016-09-29 17:52:30 +02:00
Lance Albertson 0751804867 Include option to set SSLCertificateChainFile
Some cert providers require an chain cert file so this allows for this option.
In addition, I added tests for SSL that were missing for the apache vhost file.

Change-Id: Ib3c6cf82f6afb8a79952745d8fb2116a05f59c39
2016-08-13 12:36:11 -07:00
Hendrik Frese ae8f0ec57a Removes unneeded default attribute
The attribute is set false by default as documented here:
http://docs.openstack.org/mitaka/config-reference/identity/options.html

Change-Id: I5b7bc37f08f30014468317b55eaab7a431fb58cb
2016-07-28 15:05:46 +02:00
Jan Klare 4fda2a0d5b Documenation update after refactoring
* added a lot of inline comments for attributes, recipes and provider
* updated README to the current state of the cookbook

Change-Id: Ic7b7ae6d26ce56e2237fe3215aff9ab447946b48
2016-04-27 16:12:01 -05:00
Jens Rosenboom d8a54c8e56 Remove the deprecated "verbose" option
The option "verbose" in the [DEFAULT] section is deprecated, it's
default value would be false anyway.

Change-Id: Ib7809425ca5c1651cd7642f3a6cf56cb7f6444aa
2016-04-08 17:02:17 +02:00
Jens Rosenboom 52d8000c1a Fixup identity backend handling
Instead of creating an artificial, non-functional identity-internal
endpoint use the identity-main backend that is provided via the default
config for both public and internal endpoints.

Change-Id: Ia7d7f11108f0945ccd944d7e4a5c7f7ef68bc654
2016-03-03 19:49:42 +01:00
Jan Klare 6585d611cb add fernet tokens as optional token deployment method
* added recipe for fernet_tokens (recipes/_fernet_tokens.rb)
* moved pki setup to seperate recipe (recipes/_pki_tokens.rb)
* included fernet or pki tokens recipe based on auth strategy attibute
* adapted spec accordingly and added specs for fernet_tokens

Change-Id: I37af3e8e5d4b93e0de7f4ef2d999a05573eefc26
2016-02-24 16:41:11 +01:00
Jan Klare a26d528b5e invert the order of endpoint and bind_service attributes
* endpoint type (admin, internal, public) and service (identitiy, network etc.)
  was switched during refactoring, this patch reverts this unintended switching

Change-Id: Ia5bddfc5e2fd77cd6e9e855c680b079f78fc1c3f
Depends-On: Iec485deaf415e4187a323435cce2b6bbadfc5d42
2016-02-12 18:38:19 +01:00
Jan Klare a3f18966ea refactoring final step
* added new logic into templates/default/keystone.conf.erb
* refactored attributes throughout all recipes that were connected to
  the attributes used for the keystone.conf.erb template to adapt the new
  template attribute syntax
* moved all attributes from attributes/default.rb that were used in
  keystone_conf.erb to attributes/keystone_conf.rb
* removed all attributes from default.rb and keystone.conf.erb which are set
  as default in attributes, openstack doc and used to render the template
* finished split between public, internal and admin endpoints
* refactored endpoint and bind_service logic to fit the new common cookbook
* adapted specs
* added endpoint and bind_service attributes (moved from common)
* removed keystone eventlet configuration (removed in mitaka)
* moved templated service catalog to its own section
* removed deprecated recipe for keystone server deployment without apache (also
  removed corresponding specs)
* moved recipe openrc (and template + specs) from common here, to remove inverse dependency in common
  cookbook
* adapted the specs (unit tests) to work again
* removed qpid as a messaging option (can be included in a wrapper)
* deleted default attributes from keystone.conf.rb originated in
  openstack-common
* removed suse as supported platform
* included current master of apache2 cookbook to utilize new listen logic
* removed rubocop exceptions in recipes and libraries and regenerated the
  .rubocop_todo.yaml conaining all remaining exceptions

Change-Id: I3262b2e6f792f37c32a446e6567790b82bdd4613
Implements: blueprint cookbook-refactoring
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
2016-02-08 10:17:20 +01:00
Jenkins 5b8a8f8949 Merge "Use keystone.wsgi instead of wsgi.py for RHEL/CentOS" 2015-10-30 01:47:30 +00:00
Mark Vanderwiel f178a00b84 Sync keystone paste.ini with liberty changes
Change-Id: I6bddae9fc83a5fc133e43a27e96e1a7110c94cfb
Partial-Bug: #1501064
2015-09-29 16:48:11 -05:00
Samuel Cassiba eae4ded65d Use keystone.wsgi instead of wsgi.py for RHEL/CentOS
Change-Id: I5a8e83a6238374afde42a6f5d896fc211fb49dce
Closes-Bug: #1491479
2015-09-02 08:52:31 -07:00
wenchma 9cb5f85141 Add the authorization configuration options
Add the following two configuration options:

  * external = keystone.auth.plugins.external.DefaultDomain
  * methods = external, password, token, oauth1

Change-Id: I7e9b195bd0d87824771deb23b42608ba3ec58610
Closes-bug: #1482460
2015-08-11 11:09:14 +08:00
Imtiaz Chowdhury b117e31b60 Add LDAP connection pool settings
This commit adds LDAP connection pool configuration settings currently
missing from keystone.conf template.

Change-Id: If76f71564e055608342352ddb80fbba8d078d61d
Closes-bug: #1480577
2015-08-01 12:05:17 -07:00
wenchma 3d4707453c Add identity_mapping section configurations
Add three configurations in identity_mapping group to support
keystone multi-domain.

Change-Id: I9fa68baba9144b8270f49e0c66ba283736640d08
Closes-bug: #1473897
2015-07-15 10:09:03 +08:00
Mark Vanderwiel 8bf715d8d8 Allow keystone under apache
Keystone is recommended to run under apache and the service side
is already deprecated and will be removed in the M release.
This patch adds a new recipe, server-apache, to allow keystone
under apache.

I intentionally just copied the existing server recipe and spec to
create the new ones and I figure those will just be removed in
the M release anyway, no need for "common" type code here.

The majority of the recipe code is exactly the same, just the
last lines, "Start of Apache..." have been added.

This should also work with the existing dashboard cookbook with the
one exception that the apache 3.1 cookbook is needed.  There's already
a patch out for that.

I don't plan on changing the default kilo role to use this, that will
be done once we branch for liberty.

Change-Id: I1641e1e5c6bf56d0765ef6e54ae32848431f6d6e
Implements: blueprint keystone-apache
2015-06-23 09:10:02 -05:00
Mark Vanderwiel 5a858c952d Allow keystone start delay to be configured
Change-Id: Ibe52e26e61f204d6bac1a335b1d93731a9d1f1bc
Closes-Bug: #1453842
2015-05-11 11:22:45 -05:00
Imtiaz Chowdhury b677c725a5 Make SSL settings configurable for Keystone
Currently, one cannot enable SSL for Keystone service endpoint since
the recipes do not allow configuring the SSL specific parameters. To
address this issue, this commit defines some new node attributes for
specifying SSL key, certificate and CA certificate paths. Also, this
commit exposes few other node attributes giving users more flexibility
in their SSL deployment options.

Closes-Bug #1441385

Change-Id: I2ee71f4f11e0cba619418bd5c356ec490c3be6e4
2015-04-23 05:29:03 +00:00