25 Commits

Author SHA1 Message Date
Thomas Goirand
62d556fc63 Get rid of the $pyvers variable
Since everyone has switched to Python3, it's time for the removal of the
$pyvers variable.

Change-Id: I9555be66cda91643e443be664c8f81879b749ebd
2021-05-21 11:43:14 +02:00
Takashi Kajinami
a6a78d12ac Deprecate parameters for ldap project/role driver
... because actual implementation was removed from Keystone a long ago.

Change-Id: I46cca69a18e1fb639bf87b27822c76646c87fd5a
2021-03-21 22:46:35 +09:00
Takashi Kajinami
f342aad946 Fix python package names (ldappool and pysaml2)
This patch fixes package name of python-ldapppool and python-pysaml2,
so that correct package names, python3-*, are used in OSs which use
Python3 as the default Python.

Change-Id: I0dc5dd487996307811edd177d13d6d5ac8f841ee
2020-08-30 05:15:41 +00:00
Tobias Urdin
8f5c6835db Convert more to rspec-puppet-facts
After this it's only the keystone init class and the
keystone ldap backend definition left.

puppet-keystone is the last module then everything
is using rspec-puppet-facts.

Change-Id: I3d22478a6d3f9feeacfa7d6ca9c728f9f9f2b361
2020-07-14 10:22:54 +02:00
Cyril Lopez
fa21938135 Add a LDAP param group_members_are_ids
Enable this option if the members of the group
object class are keystone user IDs rather than LDAP DNs.
This is thecase when using posixGroup as the group object
class in Open Directory.

Closes-Bug: #1805801

Change-Id: I46ec675fb959c5d1b8f9cbf300e480026e803a66
Signed-off-by: Cyril Lopez <cylopez@redhat.com>
2018-11-29 13:48:51 +00:00
ZhongShengping
a55b9e4efe Add user_description_attribute option
Adds user_description_attribute mapping support to the LDAP backend

Change-Id: Ibf14f741f95febac5f5e857a73690477e2739f55
Closes-Bug: #1736912
2018-01-02 10:56:28 +08:00
Matthew J. Black
8ba0d32d5b fix ldap packages for keystone backend
When puppet runs it will try to install python-ldap and
python-ldappool. Each run will install one or the other
due to the other package settings telling the package
manager to uninstall it.

Change-Id: I13a0af479dcac45ff77685f5eccfb865f7dab0f5
Closes-Bug: #1709519
2017-08-09 17:07:01 -04:00
ZhongShengping
b1030786a5 Deprecate group_allow_* options for ldap
group_allow_* options for ldap are deprecated in Keystone.
Setting these will now have no effect and these will be
removed as parameters in a future release.

Change-Id: Iac8a33c0d9babdf9e5bfa32ed0fa78d0aa8c7571
Closes-Bug: #1658326
2017-01-21 23:07:20 +08:00
Matt Fischer
eb7a9fa840 user_allow_* options for ldap are deprecated
These options are deprecated in keystone and setting them either true or
false will produce a warning in Keystone.

Change-Id: Icab0d0dd5558cfb03e0a9cef738beb26d9245269
2016-10-05 21:15:53 +00:00
Christopher Brown
2e32ee5ced Implement chase referrals parameter
python-ldap follows/chases referrals with anonymous access but
this is disabled by default in Active Directory. There is an
argument to set this to default to disabled but for the moment
just present an option for the user to choose.

For further information see:
https://access.redhat.com/solutions/2309891

Change-Id: I83ff3186ecced663a30a028e153f9259427fa13d
Signed-off-by: Christopher Brown <snecklifter@gmail.com>
2016-09-20 13:51:29 -06:00
Matt Fischer
c11b324573 Add the ability to control LDAP package mgmt
In some instances you may not want this module managing the LDAP
packages, so we'll wrap it with a conditional that defaults to the old
behavior.

Change-Id: Ib1b401178facf364a6a62e4ca00084c56d0ecc4d
2016-03-23 08:36:32 -06:00
Jenkins
2f4319089e Merge "use stevedore names when possible and cleanup ldap testing" 2016-02-29 20:18:46 +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
Sebastien Badia
3ab8faf6a1 Fix spec tests for RSpec 3.x and Puppet 4.x
Remove value test for ldap/project_filter and
ldap/project_attribute_ignore (the value is undef), and the comportment
is different between puppet3.x and puppet4.x (.with_value(nil) and
.with_value('')).

This patch also update RSpec 3.x matcher in order to remove deprecation
warnings (in unit spec/unit/provider/keystone_spec.rb).

Closes-bug: #1447620
Change-Id: Ib7118375d2ef72de045ece515fa611bdd3dda8e4
2015-04-23 20:20:26 +02:00
Emilien Macchi
120b20bf07 LDAP: add support to configure credential driver
Like it's the case for 'identity', add the support to configure
'credential' driver.

Closes-bug: #1238103

Change-Id: I9949dcb863c23461ce5fbe5e741d09a6a77eea9a
2015-04-16 20:09:14 -04:00
Sebastien Badia
fa7d680c0d spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax in
order to be prepared for rspec 3.x move.

In details:

  * Use shared_examples "a Puppet::Error" for puppet::error tests
  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * Fix spec tests for rspec-puppet 2.0.0
  * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
  * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)
  * Standardize gemfile (add json, webmock)

Change-Id: I35a39d4f3919d56c9448f0a0602cfe284ebc2e9c
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-03-15 18:09:53 +01:00
Matt Fischer
dadf82220b Add support for LDAP connection pools
LDAP connection pools allow for increased LDAP performance by
maintaining a connection pool. Documentation on configuation is
available here:

http://docs.openstack.org/developer/keystone/configuration.html

Change-Id: I6376e8ca5fffa7e04774fa1fa81709f7eaae3b4a
2015-02-16 15:26:38 -07:00
Matt Fischer
f8e3ed7fdd Fix deprecated LDAP config options
In Juno, the tenant_* LDAP related options are deprecated in favor of
project_*. See Table 7.38 here:
http://docs.openstack.org/trunk/config-reference/content/keystone-conf-changes-juno.html

Change-Id: I6da58559478d92df8facab1bf8191fdb2b44259b
2015-01-08 14:25:05 -07:00
Rich Megginson
99fd7bf3cb support the ldap user_enabled_invert parameter
The ldap backend has a new parameter called user_enabled_invert.
This should be supported by puppet.

Closes-Bug: #1383779
Change-Id: I6d10408b15fa56610e25b37d3962067e8361da5c
2014-11-20 08:34:37 -05:00
Aleksandr Didenko
8548a52295 Fix config options deprecated in Juno
http://docs.openstack.org/juno/config-reference/content/keystone-conf-changes-juno.html

Change-Id: I7ba69ca616bd7ae772b0a45a9fda5910fd66071c
2014-11-11 18:32:34 +02:00
Matt Fischer
cca5483237 Add python-ldappool as a requirement for LDAP
The latest LDAP code requires the python-ldappool module.

Change-Id: I36ba8082c6340b1f43fa384e28f3efebd432cf91
2014-10-23 10:00:15 -06:00
Matt Fischer
579e8ca624 Fixing several errors in the LDAP module
- The same attribute was mistakenly written to incorrect fields
 - A few tenant_ attributes were missing
 - The test was incomplete
 - The tenant_mail_attribute was mistakenly included, it doesn't exist

Change-Id: I57a05bce9b9246036f586bc80bc0b0c7f8b4694a
2014-03-28 14:04:26 -06:00
Matt Fischer
6fd675a2fe Full support for Keystone LDAP integration
Adding full support for integrating Keystone via LDAP. Enables
support for managing all LDAP related Keystone options.

 - Add two examples of LDAP configuration, although LDAP environments
   are highly variable, these will help get everyone started
 - Modify the keystone::ldap class to support all LDAP related options
 - Check sane defaults in the keystone::ldap class to hopefully reduce mistakes
 - Add a dependency on the python-ldap package
 - Modify the LDAP test to match the new class
 - Make the default-tenant optional since some LDAP backends do not
   support this

Change-Id: Ie6879eb4816fd2b906f72cac8deb3b62bd4b2430
2014-03-25 15:50:16 -06:00
Dan Bode
18a6c6a99f Move keystone ldap class to correct file.
The dirname did not match the class namespace.

Now it does. And I added some tests so that its actually
being tested for stuff like this.
2012-11-06 14:54:08 -08:00