26 Commits

Author SHA1 Message Date
Lance Bragstad
e9bb58efcf Deprecate unused parameters
Keystone deprecated the project and role ldap drivers in Kilo [0] and
removed it in Mitaka.

We can simplify the puppet variables by staging these options for
removal like we did with writeable user and group support:

  https://review.opendev.org/#/c/695079/

[0] https://docs.openstack.org/releasenotes/keystone/mitaka.html#deprecation-notes

Co-Authored-By: Dave Wilde <dwilde@redhat.com>

Change-Id: I8c4d6e695597548fff49a14b070bf4f96596d0a9
2020-03-20 23:52:33 +00:00
Lance Bragstad
1081ac51db Update ldap-backend options
Several of the options defined in ldap_backend.pp were using duplicate
values already specified in keystone/conf/ldap.py. Instead of
duplicating the same value, we can set them to undefined and just let
the default values from keystone come through.

This commit also updates the values of use_pool and use_auth_pool to
True so they're consistent with the default values in keystone.

Co-Authored-By: Dave Wilde <dwilde@redhat.com>

Change-Id: I507d1b736dbbb147c67b9d399c033703b432b16d
2020-03-18 20:54:42 +00:00
Tobias Urdin
fa11274b2f Convert all class usage to relative names
Change-Id: Ia631adf31be1eeadb7ab0f12b75f1eaed73d5fbf
2019-12-08 23:09:22 +01:00
Lance Bragstad
d8ab01080b Remove writable ldap configs from examples and spec
Keystone removed support for writable ldap support in Ocata. We should
remove these configs from the examples and the specification so that it
doesn't give the impression the functionality is still supported. It
also cleans up the configuration a little bit.

Relevant release notes that advertize the removal:

  https://docs.openstack.org/releasenotes/keystone/ocata.html#relnotes-11-0-0-origin-stable-ocata-other-notes

Change-Id: I83da28d3988960252708c60ce53fe36f34ee4204
2019-11-22 09:55:44 +00:00
Tobias Urdin
7fea7a2145 Use validate_legacy
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.

The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.

This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].

[1] https://review.openstack.org/#/c/568929/

Depends-On: https://review.openstack.org/#/c/639215/
Change-Id: Idd720f18893bea0ec1d26859e0a6907a5daa8980
2019-02-25 23:02:21 +00: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
Zuo ZongMing
5de9cddf7f Fixed keystone misspelling
Change-Id: I108377001e770cf5d069d46f35c89860fbaf6c4a
2017-12-15 15:41:33 +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
LarsErikP
e7840bfbef Adds support for configuring group_ad_nesting in keystone LDAP backend
Change-Id: I43dbfbec4f3caadc821a2e07716bdb258e8ca984
Closes-Bug: #1700070
2017-06-27 22:18:54 +02:00
Juan Antonio Osorio Robles
d7bc6907d3 Enable creating the domain for LDAP backends
this enables the creation of the actual keystone domain if the
configuration is created (via the ldap_backend resource). This is done
with the flag create_domain_entry which is false by default.

Change-Id: Ib6c633b6a975e4b760c10a2aef3c252885b05e28
2017-04-06 19:17:17 +03:00
Carlos Camacho
3e73d33bf1 Remove unnecesary spaces in log messages.
Spaces added by mistake in some log messages.

Change-Id: Idab08cf39e2e25fcfe66f788e99b0c2e42a43600
2016-09-26 14:18:11 +02: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
Carlos Camacho
08c30f7550 Fix puppet-lint before upgrading gem
Removing puppet-lint warnings
in favor of upgrading to latest gem

2016-09-13 21:10:29.621198 | manifests/federation/mellon.pp:70:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621299 | manifests/federation/openidc.pp:1:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621338 | manifests/federation/openidc_httpd_configuration.pp:2:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621371 | manifests/federation/shibboleth.pp:80:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621400 | manifests/init.pp:749:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621428 | manifests/init.pp:862:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621456 | manifests/init.pp:869:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621483 | manifests/init.pp:870:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621510 | manifests/init.pp:923:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621537 | manifests/init.pp:927:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621564 | manifests/init.pp:931:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621592 | manifests/init.pp:935:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621633 | manifests/init.pp:939:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621662 | manifests/init.pp:943:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621689 | manifests/init.pp:1062:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621717 | manifests/init.pp:1067:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621742 | manifests/ldap.pp:468:ERROR: trailing whitespace found
2016-09-13 21:10:29.621771 | manifests/ldap_backend.pp:465:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621800 | manifests/wsgi/apache.pp:282:WARNING: line has more than 140 characters
2016-09-13 21:10:29.621824 | tests/site.pp:24:WARNING: unquoted node name found
2016-09-13 21:10:29.621848 | tests/site.pp:43:WARNING: unquoted node name found

Change-Id: Ia308a08b002074d2393dc488a8ccc5429d675533
2016-09-14 12:07:22 +02:00
Emilien Macchi
8497b7573b Revert "Fix ldap_backend and puppet 4.6"
Puppet 4.6.1 has been released and we should not need this workaround
anymore.

This reverts commit 2f76f68fadd76b6d52ed7eeca19c032308419bd9.

Change-Id: Ieaf3d2a86046e178c36fc4bf5f8a69e161910902
2016-08-23 23:19:36 -04:00
Sofer Athlan-Guyot
2f76f68fad Fix ldap_backend and puppet 4.6
On xenial after update from puppet-agent 1.5 to 1.6, which include an
upgrade from 4.5 to 4.6 of puppet this code stopped working.

The ensure_resource in the keystone/init.pp manifest was not evaluated.
Adding this include seems to make it work again and we see that is the
log:

```
     Debug: Resource keystone_config[identity/domain_specific_drivers_enabled] was not determined to be defined
     Debug: Create new resource keystone_config[identity/domain_specific_drivers_enabled] with params {"value"=>true}
```

while without the include ::keystone, it's not there.

Puppet guru needed as to the why.

Change-Id: Ief78d70b8fe114ddf40d98fab93374862d3c23cb
2016-08-16 13:53:50 +02:00
Matthew J Black
8594336d74 domain backend drivers set in domain config
When using the ldap_backend define, it will set the global
keystone configuration to use that driver too. This causes
an issue where default domain might be sql for openstack
service accounts and ldap for user accounts. The class
keystone::ldap handles setting the drivers in the global
keystone config file.

Change-Id: I768c5130a6fc23ec0a0bc7686f76cc859b4c8022
Closes-Bug: 1563261
2016-03-29 08:55:10 -04: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
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
bdf4ed0a4c Merge "stop managing files that the package makes" 2016-03-01 03:41:23 +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
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
Emilien Macchi
a367105722 make sure to install ldap deps before starting keystone
This patch makes sure we install ldap packages before installing
Keystone (so before installing apache, and before starting apache).

It will avoid to have orchestration issues and missing ldap package when
starting apache.

Change-Id: I6b6c050da6fba56e40f7a6e30e0117e7493ab68d
Closes-Bug: #1538394
2016-01-27 12:41:13 -05:00
Sofer Athlan-Guyot
cf3d5e1ba7 Support for multiple ldap backend.
This enable the user to inject multiple ldap backend configurations into
keystone.

Currently the ldap configuration is modeled through a class and injected
inside keystone.conf.  In a multiple domains environment, this prevents
the user to create a ldap configuration by domain.

A deprecation warning is added to the current ldap class.  This class is
not using the define as doing so would automatically trigger a restart
of the keystone server.  This would be unexpected by the openstack
operator and would certainly be seen as a bug.  This imply a lot of code
duplication but is required to make a smooth transition.

Change-Id: I75307d4a04510d8ba1a24663b1724849ea5b48f5
2016-01-06 16:30:51 +00:00