Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

ldap (6) Versions 1.1.0

Provides generic lightweight resources for managing LDAP objects

Berkshelf/Librarian
Policyfile
Knife
cookbook 'ldap', '~> 1.1.0'
cookbook 'ldap', '~> 1.1.0', :supermarket
knife cookbook site install ldap
knife cookbook site download ldap
README
Dependencies
Changelog
Quality 33%

ldap Cookbook

This cookbook provides resources to manage LDAP objects

Dependencies

Chef 11

Ruby Gems: net-ldap, cicphash

Resources

ldap_entry

This resource is used to manage generic LDAP entries. It makes use of the ruby net-ldap library, and can be used with any LDAP directory service.

Name Description Type Default
distinguished_name Distinguished Name (DN) String Name Attribute
attributes Attributes to be set on the entry. Existing attributes of the same name will have their contents replaced Hash
append_attributes Attributes whose values are to be appended to any existing values, if any Hash
seed_attributes Attributes whose values are to be set once and not modified again Hash
prune List of attributes to be removed, or a Hash of attributes with specific values to be removed Array or Hash
host The host to connect to String localhost
port The port to connect to Integer 389
credentials See the 'Credentials' section below String or Hash 'default'
databag_name The databag that will be used to lookup the credentials data bag item String The name of the calling cookbook
use_tls Use SSL/TLS to connect to the directory server Boolean false

ACTIONS * create * delete

Other resources in this cookbook make use of this one to create objects in the directory server. This means that they also require the 'host', 'port', 'credentials' and 'databag_name' parameters which are simply passed through to this resource. Omitting these common parameters from the resource descriptions below for brevity

ldap_user

Creates a user for various kinds of identity management purposes. This is useful to create users who can bind (connect) and use the LDAP instance. It can also be used to create users with posix attributes on them for use with UNIX systems.

Name Description Type Default
common_name Value to be set as both uid and cn attributes. See relativedn_attribute String Name Attribute
surname The surname of the user. Should be set on accounts that will be used by people String Matches the value of common_name
password Optional password should be specified in plaintext. Will be converted to a salted sha (SSHA) hash before being sent to the directory String
home home directory. Required for posix accounts String
shell login shell. Required for posix accounts String
basedn The DN that will be the parent of the user account entry ( e.g. 'ou=people,... ). Required String
relativedn_attribute The relative distinguished name (RDN) attribute. This is will be used to name the common_name attribute from above. Given a common_name of 'bjensen' and a basedn attribute of 'ou=people,o=myorg,c=US' the distinguished name would be 'uid=bjensen,ou=people,o=myorg,c=US' 'uid'
uid_number Required for posix accounts. If not supplied, the basedn will be searched for the highest value and the next increment will be used Integer 1000
gid_number Required for posix accounts. If not supplied, the basedn will be searched for the highest value and the next increment will be used Integer 1000
is_person Will this be used by a person? Boolean true
is_posix Will this be used on a posix system? Boolean true
is_extensible Can the entry be extended using custom attributes? Boolean false
attrs additional attributes to be added to the account Hash

ACTIONS * create * delete

Credentials

The 'credentials' attribute found on the resources above provides a way to use credentials stored in a databag. It can either be a Hash object with the keys defined below, or a String. If this specified a String, it will look for a databag whose name matches the calling cookbook and pull out an item whose name matches the 'credentials' string. This data bag item should have the Hash keys described below. If no credentials are specified, it will look for a data bag item called 'default_credentials'.

key value example
bind_dn The bind DN used to initialize the instance and create the initial set of LDAP entries 'cn=Directory Manager'
password The password, in plain text 'Super Cool Passwords Are Super Cool!!!!!'

Usage

The default recipe will ensure that the necessary gems are installed for chef

include_recipe "ldap"

ldap_entry "ou=people,o=myorg" do
  attributes ({ objectClass: [ 'top', 'organizationalUnit'],
                ou: 'people',
                description: 'The people in my organization' })
end

ldap_user "myself" do
  basedn "ou=people,o=myorg"
  home "/home/myself"
  shell "/bin/bash"
  password "Super Cool!"
end

Authors

Authors: Alan Willis alwillis@riotgames.com

License

See LICENSE file

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

dirsrv Applicable Versions
paramount Applicable Versions

ldap CHANGELOG

This file is used to list changes made in each version of the ldap cookbook.

0.1.0

  • [your_name] - Initial release of ldap

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Collaborator Number Metric
            

1.1.0 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.1.0 failed this metric

FC059: LWRP provider does not declare use_inline_resources: ldap/providers/aci.rb:1
FC059: LWRP provider does not declare use_inline_resources: ldap/providers/entry.rb:1
FC064: Ensure issues_url is set in metadata: ldap/metadata.rb:1
FC065: Ensure source_url is set in metadata: ldap/metadata.rb:1
FC066: Ensure chef_version is set in metadata: ldap/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: ldap/metadata.rb:1
FC069: Ensure standardized license defined in metadata: ldap/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

1.1.0 failed this metric

ldap does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

No Binaries Metric
            

1.1.0 passed this metric

Publish Metric
            

1.1.0 passed this metric

Supported Platforms Metric
            

1.1.0 failed this metric

ldap should declare what platform(s) it supports.

Testing File Metric
            

1.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.1.0 passed this metric