Code Monkey home page Code Monkey logo

chef-cookbook-ca-openldap's People

Contributors

carguel avatar dosyfier avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chef-cookbook-ca-openldap's Issues

populate recipe should not provide the first attribute of the DN when creating an entry.

Currently when an entry is added, the hash provided to the underlying Net::LDAP instance includes the first attribute of the DN.
For example, if dn is

cn=foo,ou=users,dc=example,dc=com

the following attributes will be included in the attributes hash:

cn=foo

It has been observed that it could lead to wrong entry definition in the LDAP if this first attribute contains escaped characters, for example

cn=foo\>

> is not allowed by openldap except if it is escaped.

In such situation, the recipe create an entru where cn as two values, for example:

cn=foo\>
cn=foo>

It is proposed to remove the first attribute of the dn in the attribute hash, as it is automatically added by Net::LDAP/OpenLdap.

ruby_block[bdb_config] - ldif doesn't exist

On CentOS 7 the openldap-server package currently is 2.4.40
The docs for openldap 2.4 say that the bdb was superseded by hdb and indeed, if I try to run the server recipe I get this error:

ArgumentError: ruby_block[bdb_config] (ca_openldap::server line 96) had an error: ArgumentError: File '/etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif' does not exist

there is now a [...]hdb.ldif file that needs to be modified instead. It appears simply changing the filename in that case is enough.

Compile Error in server recipe on file resource node.ca_openldap.tls.key_file

An error occurs in the server recipe at compilation time.
The complete error message is:

Relevant File Content:
----------------------
chef-repo/cookbooks/ca_openldap/recipes/server.rb:

 72:      to "/etc/pki/tls/certs/#{node['fqdn']}.pem"
 73:    end
 74:
 75:    file node.ca_openldap.tls.key_file do
 76:      owner "ldap"
 77:      group "ldap"
 78:      mode  0600
 79>>     content File.read "/etc/pki/tls/private/#{node['fqdn']}.key"
 80:    end
 81:
 82:    ca_certificate_link
 83:  end
 84:
 85:  # Configure the base DN, the root DN and its password
 86:  my_root_dn = build_rootdn
 87:  ruby_block "bdb_config" do
 88:    block do

Support definition of slapd listen url

Currently, slapd is configured in /etc/sysconfig/slapd to listen on ldaps://*:636.

For some use cases, it is necessary to define precisely the list of listen urls.

Allow setting global configuration options

The server recipe only sets tls related configuration options.
The man page slapd-config describes several other options.
It should be possible to set those options based on Chef attributes.

Support update mode in the populate recipe

Currently, the populate recipe test if an entry exists before to create the entry.
If the entry already exists, it is left unchanged.

It would be interesting to support update of existing entries.

tls mode is not properly managed when defined by a role/environment attribute

Attribute ['ca_openldap']['tls']['enable'] expects to be have one of the following values:

  • :yes
  • :no
  • :exclusive

Those values are symbols.
The problem occurs if this attribute value is defined by a role or environment. In such case, the value retreived from the Chef server is a string and not a symbol.

It leads to miss configuration of Openldap.

ca_openldap breaks on chef 14.15.6

Using ca_openldap on chef 14.15.6 breaks the run with the following error:

================================================================================
Error executing action `merge` on resource 'ca_openldap_general_configuration[global_options]'
================================================================================

NameError
---------
uninitialized constant Chef::Resource::CaOpenldapGeneralConfiguration

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/ca_openldap/providers/general_configuration.rb:22:in `load_current_resource`

Support a list of attributes not to update in populate recipe.

Populate recipe add entries or update them if they already exists.
Sometimes it is desirable to not update an attribute, for example userPassword.
The proposed modification is to define a list of attributes to ignore as a new attribute and support it in the populate recipe.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.