248 Commits

Author SHA1 Message Date
Matt Fischer
a5da52ec52 Keystone hooks support
This code moves all deps to an external class so that Keystone can be
installed with mechanisms besides packages (like venv or docker). This
also cleans-up the dependency tree by removing false or confusing
dependencies.

Change-Id: If69cd7cba267f75faad51fdbc80a58b24d2095d8
Co-Author: Clayton O'Neill <clayton.oneill@twcable.com>
2016-03-15 20:11:25 -06:00
Jenkins
37d5e07c06 Merge "Fix issue with fernet_setup exec" 2016-03-07 03:07:10 +00:00
Matthew Black
cd4f7d8619 Fix issue with fernet_setup exec
The fernet_setup exec is requiring that the
keystone-user and keystone-group is passed
in the exec call. This change exposes two
new parameters that default to "keystone"
that are used in that exec call.

Change-Id: I1e122dc34d496bc26926b6bcd0921e672e099d2e
Closes-Bug: 1553327
2016-03-05 19:30:40 -05:00
Denis Egorenko
6fbae758c1 Improve keystone::wsgi spec for testing headers parameter
Change I0d1ca6b11d9ba5b03c92dff728e0edc3bd06cc19 was occasionaly merged
without adding tests for header, this patch fixes that.

Change-Id: I9a4b7bc5564a2208397a7ff1a58bd5f0600eab37
2016-03-02 14:02:32 +03:00
Jenkins
bdf4ed0a4c Merge "stop managing files that the package makes" 2016-03-01 03:41:23 +00:00
Jenkins
516e4fe83a Merge "Deprecate python.pp and fix client tags" 2016-02-29 23:19:08 +00:00
Jenkins
b30f817037 Merge "Run keystone-manage bootstrap" 2016-02-29 20:26:55 +00:00
Jenkins
2f4319089e Merge "use stevedore names when possible and cleanup ldap testing" 2016-02-29 20:18:46 +00:00
Matt Fischer
cf8012ecc2 stop managing files that the package makes
Packages already make these files so let's stop managing them like we've
done with other modules.

Change-Id: I0daea82d9ff1ac45640ce00cce64c655732db34e
2016-02-29 19:23:19 +00:00
Matt Fischer
fc59810bd8 Deprecate python.pp and fix client tags
These classes essentially do the same thing, except client.pp didn't
allow us to specify a specific package name and python.pp didn't tag
the package. Additionally, keystone.pp installs openstackclient.
Therefore I'm removing the functionality and deprecating python.pp
and will see what happens in CI.

Change-Id: I7f2243a902372e8f64127221316db7f98f94be61
2016-02-29 18:32:57 +00:00
Dan Prince
f3efc12958 Run keystone-manage bootstrap
Per upstream Keystone Mitaka commit 7b7fea7a3fe7677981fbf9bac5121bc15601163
keystone no longer creates the default domain during the db_sync. This
patch updates the keystone class so that it adds a new option to
enable_bootstrap (true by default) to re-add this functionality.

Change-Id: I2b3b83bedc951147723bc932135688fba30ecffb
Closes-bug: #1549867
2016-02-29 14:26:38 +00:00
Emilien Macchi
1f051ca9b7 use stevedore names when possible and cleanup ldap testing
Instead of using long backend/drivers name, use short name and stevedore
will load plugins for us.

It will prevent this kind of message in logs:
Failed to load 'keystone.catalog.backends.sql.Catalog' using stevedore:
No 'keystone.catalog' driver found,

Also cleanup unit and functional tests that were setting wrong
credential & assignment drivers.

Change-Id: Id3b8ed63ef9a821eba5374af7ed0fd1c8d755e09
2016-02-29 09:26:13 -05:00
Matt Fischer
3899798cb1 Remove deprecated tenant_ LDAP parameters
This cleans up a ton of useless code.

Change-Id: Ibd827dc2ad7c747714bd64a114e7374218789546
2016-02-25 22:39:29 +00:00
Jenkins
c18e00e30f Merge "Drop User/group resource dependency" 2016-02-24 03:36:34 +00:00
Emilien Macchi
b68858f7fe Drop User/group resource dependency
This patch is a squash between:
* I35187a857ae6e67b301d62e30525eaab75707161
* I30d759697ed42dc35f8df8e231c9e012d2762894

It entirely drops the usage of User resource dependency.

Note: since beaker jobs were failing with sepeparated patches, we
decided to use one patchset so Beaker job can pass the CI.

Change-Id: Id69eca0ce73ba7c16aca939821234717618f5ec4
Closes-bug: #1458915
Co-Authored-By: Drew Fisher <drew.fisher@oracle.com>
2016-02-23 11:30:48 +00:00
Matt Fischer
1a6e1f8f1b Create PKI signing folder if pki setup is enabled
This folder is not useful unless you use PKI tokens, so only
create it if we have pki setup enabled.

Change-Id: Ie0912955493164b68f9fc2cbc4690cb23f6d5c97
2016-02-23 11:20:11 +00:00
Emilien Macchi
363d63ac3d Update default paste_config on Red Hat systems
Use same default for paste_config on Red Hat & Ubuntu systems
RDO packaging is now using keystone-paste.ini file in /etc/keystone,
like Ubuntu. So there is no need anymore to make a distinction.

Change-Id: I3987c254bdafe9fb23266da2fff2e21d1cd0cec3
2016-02-22 15:18:54 -05:00
Matt Fischer
92676e7aab enable_pki_setup default to false.
Given that not many people use pki tokens and they're going to be
deprecated sometime in the next few releases, we will default this value
to false.

Change-Id: If0ea3e575f04f9d486eb1483c3e8ec07181bf015
2016-02-15 15:04:03 -07:00
Jenkins
1d03eee08a Merge "Add keystone::disable_admin_token_auth class" 2016-02-15 19:09:40 +00:00
Colleen Murphy
80ae141beb Add keystone::disable_admin_token_auth class
The keystone documentation highly recommends disabling the admin_token
authentication after the initial bootstrap because it exposes a major
attack vector. This patch adds a new class,
keystone::disable_admin_token_auth, which uses ini_subsetting to remove
the admin_token_auth keyword from the pipeline lists.

After the first puppet run, users who use this class with the default
values will need to provide some other way for puppet to authenticate
to keystone. The keystone providers can all read from /root/openrc or
from OS_* environment variables. The openstack_extras::auth_file class
can be used to create the openrc file.

This class must be declared after the main keystone class because it
uses the restart_keystone exec from the main class. This patch moves
this exec out of the $default_domain conditional so that it is
available to reference from the keystone::pipeline class. This is safe
to do because it is a refreshonly exec, so even though it is
unconditionally declared, it will only be activated if the default
domain resource activates it, or the keystone::disable_admin_token_auth
class activates it, or both. It will only restart keystone once no
matter how many times it is activated.

Change-Id: If8a7e1639189f46e16fc996fd7919eb784d24971
Depends-On: Idc3b938e37b792636ec7c2702bf8429467b78d66
2016-02-12 13:08:05 -08:00
Jenkins
d9cecd44a9 Merge "Add wsgi_chunked_request option" 2016-01-29 15:16:58 +00:00
Jenkins
49089c3468 Merge "Fixed issue with rabbit_ha_queues parameter" 2016-01-28 20:42:36 +00:00
John Dewey
015cf5c487 Add wsgi_chunked_request option
This option is necessary[1] when running OpenStack's keystone on Apache.
This functionality has been merged[2] into the upstream puppetlabs-apache.

[1] https://review.openstack.org/#/c/34835/
[2] https://github.com/puppetlabs/puppetlabs-apache/pull/890

Change-Id: Icaf550e6570890535c7f43e6c77889826bfa90cb
2016-01-28 12:40:57 -08:00
Dan Prince
41d72f6d12 Add keystone::wsgi::apache::admin_bind_host param
This patch adds a new admin_bind_host setting to the
keystone::wsgi::apache class. This setting is important
for for users who may use different (local) bind IPs
for the public and admin APIs.

This was previously possible when running Apache under
eventlet and is important to deployment tools like
TripleO which make use of these settings.

Change-Id: I22a348c298ff44f616b2e898f4872eddea040239
2016-01-28 11:14:43 -05:00
Timur Nurlygayanov
a88f8e6a7b Fixed issue with rabbit_ha_queues parameter
We need to configure rabbit_ha_queues = True only if we have
more than 1 RabbitMQ host. In we have one RabbitMQ host we need to
set rabbit_ha_queues = False.
We also need to use one pattern for configuration of this parameter
for different OpenStack components.

Change-Id: I6f25905b000494264cacbd13ba74daba538c6cf7
Closes-Bug: #1470054
2016-01-25 20:20:51 -08:00
Jenkins
b2ac15d113 Merge "Specify user and project domains for admin role" 2016-01-21 11:05:20 +00:00
Matt Fischer
3e50ac09ee Fix region association for endpoints.
The code matching the existing endpoints did not take the region into
account.  This was giving random results and messing up the catalog
badly.

This code fix it this and add associated rspec checks.

Closes-Bug: #1535939

Change-Id: If1cdf30c37194b3a7b08bf85860cf7fb7266f6e1
2016-01-20 20:37:44 +01:00
Marcus Furlong
19ee7b4a3c Specify user and project domains for admin role
In keystone::roles::admin, admin_project_domain and admin_user_domain
are not applied to the admin role. This results in errors when
applying the role as it uses the "Default" domain in
keystone_user_role:

  class { '::keystone::roles::admin':
    email => 'marcus@aptira.com',
    password => $admin_password,
    admin => 'admin', # username
    admin_tenant => 'admin', # project name
    admin_user_domain => 'admin', # domain for user
    admin_project_domain => 'admin', # domain for project
  }

Error: /Stage[main]/Keystone::Roles::Admin/Keystone_user_role[admin@admin]: Could not evaluate: No project admin with domain Default found

This patch adds the admin_project_domain and the admin_user_domain to the
role.

Change-Id: Ia3f899dfb78b0887f31ee82d6b21d2fb2536ad84
Closes-Bug: #1533913
2016-01-20 01:22:43 +11:00
chendihao
4d1fd0ea3b Use recommended abbreviation of the classes
Change-Id: I3e9a0340539425bdeb83713af909b8e80ee27195
2016-01-12 17:37:54 +08:00
Sofer Athlan-Guyot
07f19bd38a Add keystone domain specific configuration.
Implements blueprint keystone-domain-configuration

Adds a provider able to configure multiple domains and two parameters in
keystone class to setup a working multi-domains configuration.

The keystone_config type has been refactored into a mixin to be shared
by keystone_config and keystone_domain_config.

The provider, even though it is inheriting from openstack_config (and
not keystone_config because it hard code the path), has required more
new code.  The problem is that we have several configuration files to
work with (one per domain) which is unusual.

The self.prefetch method is required to check the current catalog.  If
it's changing the Keystone_config[identity/domain_config_dir] we take it
directly into account without the need for another run.

Keystone_config[identity/domain_config_dir] configuration and the
associated directory are autorequired.

Change-Id: I5e4b298460ee592640af59ac9dcbefa3daf98098
2016-01-05 19:42:15 +00:00
Iury Gregory Melo Ferreira
759c626987 Federation support for mellon
This patch aim to configure Keystone to use Mellon
according to [1]

[1] http://docs.openstack.org/developer/keystone/federation/mellon.html

Change-Id: I092ea274bd3aa6aa2fd59d01bd2af48744f37240
2016-01-04 19:34:13 +00:00
Alex Schultz
e5a4ad15de Fix cache and cache memcache configurations
This change adds the ability to manage the cache memcache servers.
Previously we were enabling the cache if memcache servers were set but
improperly configuring the cache configuration options for keystone.
The memcache servers were being set for memcache/servers but
the cache configuration looks at cache/memcache_servers for its server
list. With this change we are adding a cache_memcache_servers parameter
to allow the configuring the cache/memcache_servers. We are continuing to
use the memcache_servers as the default if cache_memcache_servers is not
provided.

Additionally we are allowing the manual enabling and disabling of the
cache configuration but will fall back to the previous behaviour
of enabling the cache if memcache servers are specified.

New parameters are:
  - cache_memcache_servers
  - cache_enabled

Change-Id: I6f86c7f8f55a6f7a7e8caa922c55e618fec8e392
Closes-Bug: #1523393
2015-12-30 11:50:15 -07:00
Emilien Macchi
6e811badf0 Manage Keystone_endpoint and Keystone_service without warnings by default
A recent change (1] made Keystone_endpoint matching service by name/type.
This change added a warning if endpoints were not created with a default
service.
The way this new feature was added is problematic because we had
warnings by default, since all Puppet modules use this define, so it
introduced a poor user experience.

This patch makes sure a service type is configured with the new way in
the keystone::resource::service_identity function, when creating
endpoint.
For backward compatibility, when no service type is specified, we have now a
conditional that sends a warning if no service type is set but still
create the endpoints.
For the service management, it adds the service type with the new way,
so we don't have any warning by default.

So from this patch, we don't have this kind of warning by default:
/Keystone_endpoint[RegionOne/keystone]/type: Support for a endpoint
without the type set is deprecated in Liberty. It will be dropped in
Mitaka

[1] http://git.openstack.org/cgit/openstack/puppet-keystone/commit/?id=0a4e06abb0f5b3f324464ff5219d2885816311ce

Closes-Bug: #1528308
Change-Id: I6e411d8f81c7ae5c768d85a236c0942d265c74dd
2015-12-22 16:21:35 +01:00
Jenkins
887d4c3c48 Merge "Correct the describe for shibboleth in tests" 2015-12-16 15:23:51 +00:00
Iury Gregory Melo Ferreira
c1e0e80513 Correct the describe for shibboleth in tests
The actual file describes service_provider
instead of shibboleth

Change-Id: Ifa27244d0f42708c32b28310ccfff3c7a0772355
2015-12-11 20:01:37 +00:00
Jenkins
a89330008c Merge "Switch Keystone to $::os_service_default" 2015-12-11 18:18:40 +00:00
Iury Gregory Melo Ferreira
c12fa3d6b6 Switch Keystone to $::os_service_default
This patch switches Keystone params, which have absent ensure, to
$::os_service_default fact

Change-Id: Ibe91ac643d620543c6f7205a8a1944a56431bf43
2015-12-10 17:37:40 +00:00
Jenkins
56050db933 Merge "Follow-up on PyMySQL support for Red Hat platforms" 2015-12-10 17:32:12 +00:00
iberezovskiy
dd72e6d549 Follow-up on PyMySQL support for Red Hat platforms
Rely on packaging dependencies to avoid issues caused by different
package names between Fedora and RHEL (python-PyMySQL vs python2-PyMySQL).

https://review.openstack.org/#/c/245229/4/spec/classes/neutron_db_spec.rb
includes all the discussion that led to this.

Change-Id: Iff047fab81f620f8df5a40296d23203461949546
2015-12-02 21:13:03 +03:00
Mykyta Karpin
4230d256f5 Add policy driver option for keystone
This option is entrypoint for the policy backend driver
in the keystone.policy namespace.
Adding below parameter:

policy/driver

Change-Id: Ie1b957f18517591a7ecd4635f907d6f56750beb7
2015-12-01 13:14:34 +02:00
Jenkins
02061e6e7c Merge "$::os_service_default in db and logging" 2015-11-26 15:57:47 +00:00
Iury Gregory Melo Ferreira
4b87767b3b $::os_service_default in db and logging
Switch to $::os_service_default all params in logging and db.
Changes: logging.pp, db.pp and tests.

Related-bug: #1515273

Change-Id: Ib84dceafb032747adc1d8b6e56bd01e89aa802cb
2015-11-25 14:03:51 +00:00
Iury Gregory Melo Ferreira
ebb2450ce5 Support for Keystone as Service Provider
This patch implements the class to configure Keystone
as a Service Provider. It covers only Keystone as SP
for K2K (Protocol is SAML and module is Shibboleth)

On Debian based systems:
1- Configure keystone.conf
2- Install Shibboleth
3- Reconfigure the selected Keystone VirtualHost on Apache.

On RedHat based systems:
1- Configure keystone.conf
2- Reconfigure the selected Keystone VirtualHost on Apache.
Note: Step 2 will only execute if the user have add the extra repository
or installed shibboleth.
(About the extra repository, see:
https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPLinuxRPMInstall)

Implements: blueprint enabling-federation
Change-Id: I32a1487c7674605124e6d0b182fe38ea4b58de87
2015-11-24 11:48:26 +00:00
Jenkins
4c6bd18b6a Merge "Add test coverage for keystone::db::mysql" 2015-11-19 17:11:42 +00:00
Jenkins
ffcbbd48a2 Merge "Support of PyMySQL driver for MySQL backend" 2015-11-17 16:05:16 +00:00
Nate Potter
7c754b89b5 Add test coverage for keystone::db::mysql
Currently most of the tests in keystone_db_mysql_spec.rb aren't checking
anything, they're just setting up the framework. This patch will add test
coverage for mysql.

Change-Id: Ieb497d7ebeb0ddc145a53548500b02fbc10399ca
2015-11-16 17:12:13 +00:00
iberezovskiy
55b64a899d Support of PyMySQL driver for MySQL backend
Add ability to use python-pymysql library
as backend for MySQL connections.
Switch acceptance tests on pyMySQL usage.
Docs: https://wiki.openstack.org/wiki/PyMySQL_evaluation

Change-Id: I52447482f15a1c075566c7596ce7c5465446fb5a
2015-11-06 17:12:55 +03:00
Maksym Yatsenko
c3c11dc5ad Add a new param for fernet tokens config
"revoke_id" param was added for fernet tokens
configuration. It revokes token by token identifier.
Setting revoke_by_id to true enables various forms
of enumerating tokens.

Change-Id: I645cd591f1018a9a595d8f738a782f64c0a984a4
2015-11-06 15:10:55 +02:00
Jenkins
580582530b Merge "Deletes tenant parameter from keystone_user" 2015-10-21 12:43:55 +00:00
Gilles Dubreuil
8461e9acfb Deletes tenant parameter from keystone_user
The tenant parameter was made deprecated in Kilo and to be removed in Liberty:
see bug/1472437 and corresponding patch.

This patch removes the tenant parameter from the keystone_user provider and the
manifests using it.

From now on, a user is assigned to a project (tenant) through the
keystone_user_role provider.

For instance,

When using the default domain:
  keystone_user_role {'user1@project':
    ensure => present,
    roles  => ['admin'],
  }

When using non default domains:
  keystone_user_role {'user1::domain1@project1::domain2':
    ensure => present,
    roles  => ['admin'],
  }

Change-Id: I79f1bca4c67a4c92234431b2ae867933172a1ebe
2015-10-20 20:28:01 +00:00